fix single tag interpolation to allow golang template engine usage

This commit is contained in:
Megan Marsh 2020-11-05 16:27:53 -08:00
parent 7a1680df97
commit f13f3d4d5f
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