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

core: Indicate change of stack termination protection #32043

Open
2 tasks
azatoth opened this issue Nov 7, 2024 · 1 comment
Open
2 tasks

core: Indicate change of stack termination protection #32043

azatoth opened this issue Nov 7, 2024 · 1 comment
Labels
@aws-cdk/core Related to core CDK functionality effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@azatoth
Copy link
Contributor

azatoth commented Nov 7, 2024

Describe the feature

When issuing cdk diff, it should indicate whether Stack Termination Protection has been enabled or disabled for a stack.

Use Case

Currently, when you are changing termination protection for a stack, there's no indication, neither when running cdk diff, nor when running cdk deploy that this change is going to be made.

Proposed Solution

  • Have cdk diff output that termination protection is changing
  • Have cdk deploy not stating (no changes) if termination protection is changed

Other Information

I tried to gauge support for this in #31928 but I never got any response.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.165.0

Environment details (OS name and version, etc.)

Ubuntu 22.04.5 LTS

@azatoth azatoth added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 7, 2024
@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Nov 7, 2024
@ashishdhingra ashishdhingra self-assigned this Nov 7, 2024
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 7, 2024
@ashishdhingra
Copy link
Contributor

Setting terminationProtection to true (default false):

const app = new cdk.App();

new CdktestStack(app, 'CdktestStack', {
  env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
  terminationProtection: true
});

doesn't report the change when running cdk diff:

Stack CdktestStack
Parameters
[+] Parameter BootstrapVersion BootstrapVersion: {"Type":"AWS::SSM::Parameter::Value<String>","Default":"/cdk-bootstrap/hnb659fds/version","Description":"Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"}


✨  Number of stacks with differences: 1

Appears to be useful feature to report change in terminationProtection for a stack.

@ashishdhingra ashishdhingra added effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 7, 2024
@ashishdhingra ashishdhingra removed their assignment Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants