Open hashibot opened 6 years ago
Agreed. We need to comply with a naming convention for all resources, so this would be super helpful.
This may be unsupported by AWS (see https://forums.aws.amazon.com/thread.jspa?threadID=122354). Terraform may not be able to implement this directly.
Two main workarounds (See https://blog.cloudability.com/two-solutions-for-tagging-elusive-aws-ebs-volumes/): 1) Periodically look for untagged volumes and apply instance tags to the volume 2) Apply instance tags to the volume during startup
https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#propagate_at_launch this is not a option?
https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#propagate_at_launch this is not a option?
That only tags the instances but not their root block volume.
workaround: root-device tagging with userdata: https://stackoverflow.com/a/55158550/10374572
The fix would probably also apply to the root_block_device
for the aws_instance
as mentioned in #4017
Using volume_tags couldbe another workaround as it will tag root_block_device
Seems launch config should support tags for volumes as well: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html
Any update on this one?
This issue was originally opened by @zoltan-toth-mw as hashicorp/terraform#17054. It was migrated here as a result of the provider split. The original body of the issue is below.
It would be nice to have volume tags in aws_launch_configuration resource to make them easily identifiable.
Something like: