Terraform: Allow tags to be configured on instances launched by an ASG

Created on 5 Feb 2015  ยท  8Comments  ยท  Source: hashicorp/terraform

I'd like to use terraform to define autoscaling groups which launch instances tagged a specific way (i.e. PropagateAtLaunch=true), similar to:

aws autoscaling create-or-update-tags --tags "ResourceId=my-asg,ResourceType=auto-scaling-group,Key=environment,Value=test,PropagateAtLaunch=true"

It'd also be useful to support tags which are PropagateAtLaunch=false, but that's less important for my use-case.

enhancement provideaws

Most helpful comment

@krisdigitx you just create an auto scaling group with tags which specify propagate_at_launch = true, and then those tags are copied onto any instances launched by that ASG.

See https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html and http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html for more info.

All 8 comments

+1

+1

:+1:

+1

This is implemented in #1319

any examples on how to tag instances using ASG??

@krisdigitx you just create an auto scaling group with tags which specify propagate_at_launch = true, and then those tags are copied onto any instances launched by that ASG.

See https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html and http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html for more info.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

larstobi picture larstobi  ยท  3Comments

rjinski picture rjinski  ยท  3Comments

ketzacoatl picture ketzacoatl  ยท  3Comments

franklinwise picture franklinwise  ยท  3Comments

zeninfinity picture zeninfinity  ยท  3Comments