-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better interaction between provider default_tags and aws_instance volume_tags #19188
Comments
I would argue that volume_tags should definitely inherit default_tags, if the idea behind default_tags is to replace the general use of tags on resources (except for overrides). Otherwise root ebs volumes of ec2 instances will not get tagged, while separate ebs volume will, and everything else. |
It should be documented that This note from the
|
Potential workaround where the provider is not available: data "aws_default_tags" "example" {}
aws_instance {
volume_tags = merge(aws_default_tags.example.default_tags, var.extra_tags)
} |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Description
3.38.0 introduced the very handy provider-level
default_tags
which avoids a lot of tedious boilerplate. While migrating a large project, I noticed that EBS resources created byaws_instance
do not usedefault_tags
.Obviously this could be resolved by changing
volume_tags
to inherit thedefault_tags
values but I put this in as a feature request because it seems like a more generally useful situation would be making the provider'sdefault_tags
queryable in some way so it could be used for every resource type which has the concept of tags separate from the standardtags
attribute — I'm pretty sure the same situation will arise with AWS Backup, for example — and it would be handy if you could reference the provider's configuration in something likemerge(provider.aws.default_tags, var.extra_tags)
.New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: