(core): import automatically resources like cloudwatch/s3,etc there were part of CDK stack/cloudformation before deletion #30545
Labels
@aws-cdk/aws-s3
Related to Amazon S3
effort/large
Large work item – several weeks of effort
feature-request
A feature should be added or improved.
p3
Describe the feature
If you have a CDK stack with for example a S3 bucket or cloudwatch loggroup and you remove the CDK stack and S3 contains one or more files the S3 bucket is not destroyed (or the cloudwatch log group). If you redeploy your stack it will complain that S3 or cloudwatch loggroup already exist. This is a known issue/feature.
What i want is that once you redeploy the CDK stack it will automatically reconigize that the S3 bucket and/or cloudwatch log group is a part of the CDK stack and will automatically add this to the stack. Then it will make sure it contains the correct settings,etc. Maybe by introducing extra meta-data on the S3 or cloudwatch group you can achieve something like this.
I think this is one of the most common problems i face today with CDK. I have to manually delete the cloudwatch loggroup and it's not possible to retain the events (yes, you can make a backup to s3 but you cannot create a bacukup,delete the old group, create the new group and import all the old events back!).
Any ideas if something like this is possible to do in CDK?
Use Case
-> Manual task
-> Frustrating if you forget
-> Need access to production environment to fix things
-> Hard to maintain the cloudwatch log events
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.141.0 (build 3d1c06e)
Environment details (OS name and version, etc.)
Windows 10/ Linux
The text was updated successfully, but these errors were encountered: