[New Resource]: Be able to apply tags to AWS Organizations Accounts that were created outside of Terraform #30240
Labels
new-resource
Introduces a new resource.
service/organizations
Issues and PRs that pertain to the organizations service.
Description
It is currently possible to tag Accounts in AWS Organizations only when created using the
aws_organizations_account
resource.For AWS Accounts that are created through Control Tower (or other), there's currently no way to apply these in Terraform without resorting to scripting.
Currently we have to do it procedurally:
There is already a data source for
aws_organizations_resource_tags
. Having either anaws_organizations_tag
oraws_organizations_account_tag
resource (similar toaws_ec2_tag
) would be a big help.Requested Resource(s) and/or Data Source(s)
Potential Terraform Configuration
References
AWS | Organizations | Tag Resource
(works for both new and existing tags for a given key)
Ex:
aws organizations tag-resource --resource-id "$ACCOUNT_ID" --tags "Key=$TAG_NAME,Value=$TAG_VALUE"
AWS | Organizations | List Tags For Resource
Ex:
aws organizations list-tags-for-resource --resource-id "$ACCOUNT_ID" --output json
AWS | Organizations | Untag Resource
Ex:
aws organizations untag-resource --resource-id "$ACCOUNT_ID" --tag-keys "$TAG_NAME"
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: