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

(app-staging-synthesizer): clean up staging resources on deletion #25722

Closed
1 of 2 tasks
kaizencc opened this issue May 24, 2023 · 1 comment · Fixed by #25906
Closed
1 of 2 tasks

(app-staging-synthesizer): clean up staging resources on deletion #25722

kaizencc opened this issue May 24, 2023 · 1 comment · Fixed by #25906
Labels
@aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@kaizencc
Copy link
Contributor

Describe the feature

When using the AppStagingSynthesizer, staging resources that live alongside your cdk app do not get deleted when the app gets deleted. This is because these resources are not empty, and CloudFormation cannot delete un-empty S3 buckets and ECR repos.

We solve this problem in the CDK with custom resources, but these custom resources are assets themselves that need to live in a staging bucket. This creates a chicken-and-egg problem for the AppStagingSynthesizer, because there's nowhere to put the cleanup custom resource asset.

Use Case

Users using cdk deploy and cdk destroy on the AppStagingSynthesizer as part of development. We don't destroy the staging resources, so the user has to manage their deletion themselves. Otherwise, if you cdk deploy a resource with the same name, cdk deploy will fail.

Proposed Solution

Potentially, we can minimize these custom resources and provide them as inline code directly in the template. If we can do that, we can clean up staging resources on deletion and remove a big friction point for users.

Other Information

No response

Acknowledgements

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

CDK version used

CDK v1.83.0

Environment details (OS name and version, etc.)

mac

@kaizencc kaizencc added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 24, 2023
@github-actions github-actions bot added the @aws-cdk/assets Related to the @aws-cdk/assets package label May 24, 2023
@kaizencc kaizencc added @aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package p2 effort/medium Medium work item – several days of effort and removed @aws-cdk/assets Related to the @aws-cdk/assets package needs-triage This issue or PR still needs to be triaged. labels May 24, 2023
@mergify mergify bot closed this as completed in #25906 Jun 21, 2023
mergify bot pushed a commit that referenced this issue Jun 21, 2023
…#25906)

closes #25722

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/app-staging-synthesizer-alpha Related to the @aws-cdk/app-staging-synthesizer-alpha package effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant