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] - Can not create multiple policies at the same time #2245

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

Comments

@rehanvdm
Copy link

Name of the resource

AWS::Organizations::Policy

Resource Name

No response

Issue Description

Can not create multiple Org policies within 1 stack at the same time. The error: "A policy with the specified name and type already exists."

It will pick one of the policies it tries to create and then throw this error on it. When rolling back, it will then not delete this policy it has identified as being duplicate.

This error occurred when a stack update tried to create 20 ORg policies, each with unique names.

To resolve this, I uncommented some Org policies and deployed in smaller batches. The biggest number I could verify is that it still works creating 9 within 1 stack update.

Expected Behavior

CFN should create the resources as expected and also not give a name conflict error, because there isn't any.

Observed Behavior

As above.

Test Cases

Negative case

  1. Create an empty stack (as baseline)
  2. Update it to create 20 Org Policies within 1 update
  3. Observe it fails with duplicate name error, even though each Org policy has a unique name

Positive case

  1. Create an empty stack (as baseline)
  2. Update the template, comment out all the Org policies
  3. Comment in 5 Org Policies, deploy and it will work. Repeat 4 times to deploy all 20 policies.

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