-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-appconfig-alpha: SQS Extension association always creates cdk diff #27676
Labels
@aws-cdk/aws-sqs
Related to Amazon Simple Queue Service
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Comments
fredricbillow-axis
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 25, 2023
github-actions
bot
added
the
@aws-cdk/aws-sqs
Related to Amazon Simple Queue Service
label
Oct 25, 2023
khushail
added
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 25, 2023
fredricbillow-axis
changed the title
aws-appconfig-alpha: SQS Extension association always creates ckd diff
aws-appconfig-alpha: SQS Extension association always creates cdk diff
Oct 26, 2023
@fredricbillow-axis thanks for reporting this and sharing the link to the code as well. I am able to repro this. |
khushail
added
p2
effort/small
Small work item – less than a day of effort
and removed
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
labels
Oct 27, 2023
mergify bot
pushed a commit
that referenced
this issue
Dec 9, 2023
Fixing extensions CDK diff since before it would always generate a new diff even if nothing changed. Closes #27676. ---- *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-sqs
Related to Amazon Simple Queue Service
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
When using the
onDeploymentComplete
function on an Environment to create an Extension Association using SqsDestination, CDK will always show a diff. Deploying the stack does not resolve the issue and instead a new diff will be shown.Expected Behavior
When running
cdk diff
which shows a diff, then runningcdk deploy
to deploy the diff, there shouldn't be a new diff corresponding to the same resources. Runningcdk diff
again should show no diff.Current Behavior
You end up in an endless loop of diffs even when deploying every diff. The diff looks like:
IAM Statement
Resources
Reproduction Steps
Create a stack like so
Deploy the stack.
The stack should deploy without any issues.
Run
cdk diff
The diff shows both IAM statement changes and resource changes:
IAM Statement
Resources
Deploy the stack again.
The stack should deploy without any issues.
Run
cdk diff
againAgain, the diff shows IAM and resource changes.
IAM Statement
Resources
Possible Solution
Most likely, the reason for the bug is located at
aws-cdk/packages/@aws-cdk/aws-appconfig-alpha/lib/extension.ts
Line 521 in de7fb04
The statement
eventDestination.extensionUri
results in using theQueue.queueArn
value in the case of the event destination being an SqsDestination:aws-cdk/packages/@aws-cdk/aws-appconfig-alpha/lib/extension.ts
Line 87 in de7fb04
This results in a new ID being generated for the Role every time, ultimately replacing the current one as CDK treats it as a new Role.
A solution would be to use something else than the
queueArn
to create the ID of the Role.Additional Information/Context
No response
CDK CLI Version
2.102.0 (build 2abc59a)
Framework Version
2.102.0-alpha.0
Node.js Version
18.18.2
OS
macOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: