question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[cdk-pipelines] stack cleanup

See original GitHub issue

Following this example here

npx cdk deploy \
  --profile account1-profile \
  CdkpipelinesDemoPipelineStack

The above command creates a pipeline stack and then the pipeline creates an application stack.

npx cdk destroy \
  --profile account1-profile \
  CdkpipelinesDemoPipelineStack

Only delete the pipeline stack but not the application stack created earlier.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:37
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
gshpychkacommented, Jun 11, 2021

@rix0rrr Is this not planned anymore?

6reactions
ssaarelacommented, Jun 7, 2022

Listing stacks as parameters to destroy is a pretty simple workaround:

#!/bin/bash
STACKS="$(cdk list | tr '\n' ' ')"
cdk destroy ${STACKS}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Clean up | AWS CDK Workshop
Clean up your stack # When destroying a stack, resources may be deleted, retained, or snapshotted according to their deletion policy.
Read more >
AWS CDK Advanced Workshop
To clean up after this tutorial you can delete all the resources you have created by deleting the CloudFormation stacks: Delete the following...
Read more >
Cleaning stacks in target account by pipeline - Stack Overflow
The solution is mentioned in the tutorial you linked: Clean up. Delete stacks using the command cdk destroy --all.
Read more >
CDK Pipelines: Continuous delivery for AWS CDK applications
After you define the stack that makes up your application, you can deploy it through a pipeline. The first step is to define...
Read more >
CDK Pipelines: Beyond the Basics - AWS in Plain English
How to build a pipeline that deploys two stacks (backend and frontend) to AWS cloud using CDK. This post assumes some basic CDK...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found