I’m using the EBS builder to build an AMI, and I need to use multiple launch_block_device_mappings
blocks to attach multiple EBS volumes to the instance used for building the AMI. I need to tag each of these volumes individually, applying different tags to different volumes. I see that I can use run_volume_tag
and run_volume_tags
, but that appears to assign a static set of tags to all volumes attached to the instance. How can I apply different tags to different volumes individually?
This probably isn’t valid config, but it shows my intention:
source "amazon-ebs" "foo" {
...
launch_block_device_mappings {
device_name = "/dev/sbd"
tags {
Name = "someapp-data-drive"
}
}
launch_block_device_mappings {
device_name = "/dev/sdc"
tags {
Name = "someapp-config-drive"
}
}
}
Thanks.