Default Tags in the Terraform AWS Provider
https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider
Default Tags in the Terraform AWS Provider
https://www.hashicorp.com/blog/default-tags-in-the-terraform-aws-provider
Nice to finally have this, so I don’t have to repeat tagging for each resource.
I love this feature. I actually upgraded some new terraform projects just to use this. There is a bug in some resources I use name to comment that it’s managed by terraform in a mixed account and it was hard fail with inconstant state about an unexpected name tag even when I didn’t have a name tag in my default tag providers section.
I wonder if these tags allow for variable interpolation?
We created a module to standardize our default tags which allows us to use variable interpolation to set the tag values - helpful when you need to set some tag values from an automated pipeline.
If these support the same interpolation it could be very helpful…
It uses normal Terraform variables - anything you could express as a map will work.
This has been a long time coming and it’s great. The only drawback is that you’ll need to deal with some gaps around things like EC2 volume_tags where you don’t have an easy way to reference the provider default tags to say “use the defaults here, too” without passing in the same object you used for the provider default_tags argument.
https://github.com/hashicorp/terraform-provider-aws/issues/19188
I’ve been already defining a default tags map in the local variable file and merging the map on all resources that have a tag property for a while now. This will be nice if it allows interpolation.
now I need to remove the old tags from everything…