-
Notifications
You must be signed in to change notification settings - Fork 4k
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-events): {EventsPolicyId} already exists in stack
Upgrade to 2.117.0 rolls back due duplicate resources
#28520
Labels
@aws-cdk/aws-events
Related to CloudWatch Events
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
management/tracking
Issues that track a subject or multiple issues
p0
Comments
pgarbe
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 29, 2023
Thanks for the report @pgarbe -- looks like something needs to be done about this, I'll be looking into it |
kaizencc
added
p0
effort/small
Small work item – less than a day of effort
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 29, 2023
mergify bot
pushed a commit
that referenced
this issue
Jan 2, 2024
#27340 introduced the ability to create multiple event bus policies on a single event bus. To facilitate this, the logical Id was changed from `"Policy"` to the statementId. This triggers a replacement, which fails in CloudFormation because the statement ID does not change. The idea behind this PR is simple -- we are updating the statement ID of the policy to trigger a change for anyone who updates to the new version. I think we are okay with this change because no one should be depending on the statementIds of their policies. And since the policy is not a stateful resource, updating the policy should not harm anyone. I have checked the feasibility of this PR on my own, hence the lack of an integ test. closes #28520 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
hawflau
added
the
management/tracking
Issues that track a subject or multiple issues
label
Jan 3, 2024
HBobertz
changed the title
(aws-events): Upgrade to 2.117.0 rolls back due duplicate resources
(aws-events): Jan 3, 2024
{EventsPolicyId} already exists in stack a
Upgrade to 2.117.0 rolls back due duplicate resources
HBobertz
changed the title
(aws-events):
(aws-events): Jan 3, 2024
{EventsPolicyId} already exists in stack a
Upgrade to 2.117.0 rolls back due duplicate resources{EventsPolicyId} already exists in stack a
Upgrade to 2.117.0 rolls back due duplicate resources
HBobertz
changed the title
(aws-events):
(aws-events): Jan 3, 2024
{EventsPolicyId} already exists in stack a
Upgrade to 2.117.0 rolls back due duplicate resources{EventsPolicyId} already exists in stack
Upgrade to 2.117.0 rolls back due duplicate resources
HBobertz
pushed a commit
to cdklabs/aws-cdk-notices
that referenced
this issue
Jan 3, 2024
mergify bot
pushed a commit
to cdklabs/aws-cdk-notices
that referenced
this issue
Jan 3, 2024
Notice for [#28520](aws/aws-cdk#28520)
paulhcsun
pushed a commit
to paulhcsun/aws-cdk
that referenced
this issue
Jan 5, 2024
aws#27340 introduced the ability to create multiple event bus policies on a single event bus. To facilitate this, the logical Id was changed from `"Policy"` to the statementId. This triggers a replacement, which fails in CloudFormation because the statement ID does not change. The idea behind this PR is simple -- we are updating the statement ID of the policy to trigger a change for anyone who updates to the new version. I think we are okay with this change because no one should be depending on the statementIds of their policies. And since the policy is not a stateful resource, updating the policy should not harm anyone. I have checked the feasibility of this PR on my own, hence the lack of an integ test. closes aws#28520 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-events
Related to CloudWatch Events
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
management/tracking
Issues that track a subject or multiple issues
p0
Please add your +1 👍 to let us know you have encountered this
Status: RESOLVED
Overview:
#27340 introduced the ability to create multiple event bus policies on a single event bus. To facilitate this, the logical Id was changed from "Policy" to the statementId. This triggers a replacement, which fails in CloudFormation because the statement ID does not change.
Complete Error Message:
Workaround:
Solution:
Upgrade to 2.118.0 or higher
Related Issues:
Original Report
Describe the bug
Upgrading to v2.117.0 breaks existing EventBus resources with an attached EventBusPolicy. The stack can't be deployed.
Expected Behavior
Upgrade of CDK versions without breaking changes
Current Behavior
The stack rolls back with a message like this:
Reproduction Steps
Create an EventBus and a EventBus policy with CDK < 2.117.0. After updating to 2.117.0 the deployment fails.
Reason:
The PR #27340 changes the logicalId of the policy (from "Policy" to Sid) but keeps the
StatementId
. The changed logicalId triggers a replacement. But CloudFormation can't create multiple policies with the same StatementId and rolls back.Possible Solution
Workaround: Rename the
Sid
of your Policy and CloudFormation can roll out the update.Possible fix: Ensure that the
StatementId
changes for existing resources (maybe prefix it or add a hash)Additional Information/Context
No response
CDK CLI Version
2.117.0
Framework Version
No response
Node.js Version
18
OS
all
Language
TypeScript, Python, .NET, Java, Go
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: