_TL;DR: I have 2 AWS accounts, one creating resources and tagging them then sharing them to the other account using AWS RAM and generating a file containing maps of tags per resource's ARN. But aws_ec2_tag do not accept resource ARN (it needs resource ID). Please add support for ARN._
I would like to suggest improvement on how aws_ec2_tag is given instruction on which resource to tag. I think it should accept ARN identifiers.
My use-case is:
Network team in charge of the AWS infrastructure creates some resources in their "network" AWS account. They also and tag and share them with a second "application" account (for the Application team) using AWS RAM/Resource Access Manager.
Because tags are not shared from one account to another, Application team need to (re-)tag those same resources.
So network team also generates a (YAML) file using the aws_resourcegroupstaggingapi_resources data source where each key is the ARN of a resource and the value is a map of the tags applied to said resource:
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
_TL;DR: I have 2 AWS accounts, one creating resources and tagging them then sharing them to the other account using AWS RAM and generating a file containing maps of tags per resource's ARN. But
aws_ec2_tag
do not accept resource ARN (it needs resource ID). Please add support for ARN._I would like to suggest improvement on how
aws_ec2_tag
is given instruction on which resource to tag. I think it should accept ARN identifiers.My use-case is:
Network team in charge of the AWS infrastructure creates some resources in their "network" AWS account. They also and tag and share them with a second "application" account (for the Application team) using AWS RAM/Resource Access Manager.
Because tags are not shared from one account to another, Application team need to (re-)tag those same resources.
So network team also generates a (YAML) file using the
aws_resourcegroupstaggingapi_resources
data source where each key is the ARN of a resource and the value is a map of the tags applied to said resource:Example of file:
The best (only) way to re-tag thoses ram-obtained resources is the
aws_ec2_tag
, but it only accepts IDs, not ARN.On the other side, the
aws_resourcegroupstaggingapi
data source only exports ARNs, not IDs.If I try to pass an ARN to
aws_ec2_tag
asresource_id
argument, it fails with:Affected Resource(s) and/or Data Source(s)
aws_ec2_tag
Potential Terraform Configuration
References
No response
Would you like to implement a fix?
None