1 Answer
- Newest
- Most votes
- Most comments
1
Per the CDK docs at https://docs.aws.amazon.com/cdk/v2/guide/resources.html#resources_physical_names, you can set the physical name for some resources using the *_name
property. The list of resources which support this is in the CloudFormation docs (since CDK is beholden to CFN's resource model, so you can't just do this on any resource).
It would be worth bearing in mind the warnings in both those pieces of documentation around the impact of fixing a resource's physical name: if you later need to perform an update which requires replacement of the resource, you won't be able to. (This is because CFN creates a new resource, then deletes the old one, and you can't have two resources with the same physical id.)
Relevant content
- Accepted Answerasked a year ago
- How can I troubleshoot issues when I use the AWS Load Balancer Controller to create a load balancer?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 4 months ago
can a DeletionPolicy: Retain and solve this problem in regards of resource replacement?