From 0cbf80dafe26c5e04c3913e3197c4e652f910915 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Mon, 16 Mar 2020 12:26:03 +0100 Subject: [PATCH] wip --- builder/amazon/ebsvolume/block_device.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/builder/amazon/ebsvolume/block_device.go b/builder/amazon/ebsvolume/block_device.go index fe4b51a15..fac343053 100644 --- a/builder/amazon/ebsvolume/block_device.go +++ b/builder/amazon/ebsvolume/block_device.go @@ -34,10 +34,22 @@ func (bds BlockDevices) BuildEC2BlockDeviceMappings() []*ec2.BlockDeviceMapping } func (bds BlockDevices) Prepare(ctx *interpolate.Context) (errs []error) { + for _, block := range bds { + + for _, s := range []struct { + tagMap awscommon.TagMap + kvs hcl2template.KeyValues + }{ + {block.Tags, block.Tag}, + } { + errs = append(errs, s.kvs.CopyOn(s.tagMap)...) + } + if err := block.Prepare(ctx); err != nil { errs = append(errs, err) } + } return errs }