- 最新
- 投票最多
- 评论最多
Hi, @kkohut.
It is not provided as a basic function.
So you need to think of another workaround according to the failure case you assume.
If you fail to create a resource due to conflicting names due to some conditions when creating it in a stack (for example, RDS Identifier), even if you want to create a new stack or resource so that existing resources are not affected For example, resource names can be made unique by including the AWS::StackName and AWS::StackId variables.
If you need more complex conditions than that, you can use custom resources to check existing resources in your Lambda function.
However, using a custom resource does not associate an existing resource with your stack.
Notice that the CloudFormation resource is relative to his stack.
I don't think you understand what I am trying to do. I have a CFT that creates resources. One of the resources is an S3 bucket. I want to modify the CFT to create some additional resources. SO I add those additional resources to the CFT, and run it again. But it fails, because it tries to create the S3 bucket again. I thought there was a way to indicate in the CFT to only create the resource if it doesn't already exist.
Are you creating new when you add resources to the stack? Why no stack update?
I guess you are not using CFT update option, you are creating new stack and that is why it is creating new resources. Can you share your error or screenshot?
@hash thank you for following me
@kkohut If you want to add another resource to the stack without affecting existing resources, you should change the template and update the stack.
It is possible to create a new stack, but since it will all be created with different resources, it is necessary to devise ways to make parameters with unique restrictions unique as described above.
相关内容
- AWS 官方已更新 2 年前
"how do I configure it so that it won't gack when it tries to recreate the existing resoures?" Can you explain more?