Closed kstadnik-aws closed 11 months ago
Duplication of https://github.com/aws-ia/terraform-aws-control_tower_account_factory/issues/160, I hope the response will be different this time
@kstadnik-aws thank you for reaching out. Please refer to #160 which is a duplicate of this issue.
AFT Version: 1.10.3
Terraform Version & Provider Versions Please provide the outputs of
terraform version
andterraform providers
from within your AFT environmentterraform version
terraform providers
Bug Description When performing an update to
account_tags
property (aft-account-requests
repository) by removing the tag from the dictionary, the tag as the result is not removed. All other updates, such as adding a tag or changing a value for an existing tag, are working properly. The reason is in the nature oforganizations
API calltag_resource
that Lambda functionaft-account-provisioning-framework-tag-account
performs. This call can only create new tag or update existing one, but not remove the tag you didn't provide.To Reproduce Steps to reproduce the behavior:
aft-account-requests
repository.account_tags
property by adding one new tag, updating one of the existing tags, and removing one.Expected behavior You should see that one tag was removed, one tag was updated, one tag was added, other tags are left unchanged.
Additional context A potential solution could be to find a difference between the tags you provided (the tags you want to see at the end) with the existing tags, find the ones that should be removed and remove them preforming an
untag-resource
organizations API call.