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-eks] Nested stacks always cause an update #6046
Comments
Hi @moatazelmasry2, the default behavior for |
Hi there thanks for the reply. I think you misunderstood my question. It is
only one stack that created eks. Cdk eks created multiple nested Stacks.
This is fine. But even while cdk diff is showing no diff, cloudformation
updates the main stack and the nested Stacks. I haven't investigated
further but this might be related to the custom resources defined and or
the lambda function. Nevertheless it is a bit irritating if the Pipeline
running cdk deploy has to run for Several minutes updating the eks stack.
Although there are no changes.
Cheers
…On Tue 4. Feb 2020 at 20:21, Somaya ***@***.***> wrote:
Hi @moatazelmasry2 <https://github.com/moatazelmasry2>, the default
behavior for cdk deploy is to update ALL stacks. If you only want to
deploy one, then you would need to specify the stack name after “deploy”
(ie. cdk deploy NotNestedStack). Hope that helps! If you have other
questions a great place to start is to look on Stackoverflow
<https://stackoverflow.com/questions/tagged/aws-cdk> or on Gitter
<https://gitter.im/awslabs/aws-cdk>. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6046?email_source=notifications&email_token=ABCADRKLEYPPYMQNY2WEVX3RBG5Z5A5CNFSM4KOJ2NH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKY3PAY#issuecomment-582072195>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCADROOCMJTOTPTWDFFIITRBG5Z5ANCNFSM4KOJ2NHQ>
.
|
Unfortunately there isn’t much we can do at the CDK level to address this. CloudFormation will always attempt to update nested stacks, even if they did not change. We have reached out to the CloudFormation team and proposed a way to avoid it. We will follow up on this issue when we have more information. |
Bail-out before executing and creating change sets when the currently deployed template is identical to the one we are about to deploy. This resolves #6046, where a stack that contains nested stack(s) will always try to update since CloudFormation assumes the nested template might have changed. In the CDK, since nested template URLs are immutable, we can trust that the URL will be changed, and therefore invalidate the *parent* template. This also fixes the bug described in #2553, where a stack that includes a `Transform` always fail to deploy with `No updates are to be performed` when there are no changes to it. The switch `--force` can be used to override this behavior. Added unit test and performed a few manual tests to verify both bugs are resolved. Resolves #6216
* feat(cli): skip deployment if template did not change Bail-out before executing and creating change sets when the currently deployed template is identical to the one we are about to deploy. This resolves #6046, where a stack that contains nested stack(s) will always try to update since CloudFormation assumes the nested template might have changed. In the CDK, since nested template URLs are immutable, we can trust that the URL will be changed, and therefore invalidate the *parent* template. This also fixes the bug described in #2553, where a stack that includes a `Transform` always fail to deploy with `No updates are to be performed` when there are no changes to it. The switch `--force` can be used to override this behavior. Added unit test and performed a few manual tests to verify both bugs are resolved. Resolves #6216 * Add alias -f for —force * Add integration test Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
❓ General Issue
The Question
This is not a bug report per se. So I'm creating an EKS cluster using the cdk. Things work well and it creates a couple of nested stacks.
Now when I run
cdk deploy
without changing a line, it will re update all those nested stacks and the main stack as well.Is this the expected behavior. What is actually being changed everytime??
The text was updated successfully, but these errors were encountered: