Merge pull request #10224 from hashicorp/fix_tag_interpolation

fix single tag interpolation to allow golang template engine usage
This commit is contained in:
Megan Marsh 2020-11-06 11:05:24 -08:00 committed by GitHub
commit 396b0237fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 0 deletions

View File

@ -201,8 +201,11 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
Exclude: []string{
"ami_description",
"snapshot_tags",
"snapshot_tag",
"tags",
"tag",
"root_volume_tags",
"root_volume_tag",
"command_wrapper",
"post_mount_commands",
"pre_mount_commands",

View File

@ -92,10 +92,15 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
Exclude: []string{
"ami_description",
"run_tags",
"run_tag",
"run_volume_tags",
"run_volume_tag",
"spot_tags",
"spot_tag",
"snapshot_tags",
"snapshot_tag",
"tags",
"tag",
},
},
}, raws...)

View File

@ -91,10 +91,15 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
Exclude: []string{
"ami_description",
"run_tags",
"run_tag",
"run_volume_tags",
"run_volume_tag",
"snapshot_tags",
"snapshot_tag",
"spot_tags",
"spot_tag",
"tags",
"tag",
},
},
}, raws...)

View File

@ -103,6 +103,18 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
PluginType: BuilderId,
Interpolate: true,
InterpolateContext: &b.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{
"run_tags",
"run_tag",
"run_volume_tags",
"run_volume_tag",
"spot_tags",
"spot_tag",
"tags",
"tag",
},
},
}, raws...)
if err != nil {
return nil, nil, err