Skip to content
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

[AWS::Organizations::Policy] - [BUG] - Duplicate tag keys when Stack tags and Resource tags are the same #2244

Open
rehanvdm opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@rehanvdm
Copy link

rehanvdm commented Jan 24, 2025

Name of the resource

AWS::Organizations::Policy

Resource Name

No response

Issue Description

Stack levels and resource level tags are not deduped as they should be. Both are added by CFN when making the API call and CFN errors with: "Your request includes duplicate tag keys".

When creating the stack it works as expected, the resource level tags take precedence over the stack level tag that has the same key. But as soon as another Org policy is added, it does not do this anymore and just adds the keys together in the array.

Expected Behavior

Resource level tags take precedence over the stack level tags and override them like with all resources.

Observed Behavior

The stack has Tag Key named "Owner", each Org policy also has the key name Owner in the CFN template (resource level)

  1. Stack Create (with 1 org policy) ✅
  • Creates new Org policy with the correct tag
  1. Stack Update (add another org policy) ❌
  • Creates new Org policy, fails with the duplicate key error, rolls back

Test Cases

As mentioned above.

The CFN changeset does not show duplicate keys but Cloudtrails shows that there are duplicate keys when CFN makes the API call only once the CFN stack already exists. Then adding another Org policy throws and error.

Other Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant