Cloud Formation - skip creation if resource exists

0

I'm creating CF template and I would like to use Conditions to check if resource not exists else proceed with next steps. The error that I am getting is

Resource ApplicationName/application.log already exists.

Would the community have an input?

Description: CloudWatch log groups used by application ApplicationLogGroup: Properties: LogGroupName: ApplicationName/application.log RetentionInDays: 545 Type: AWS::Logs::LogGroup

已提问 1 年前231 查看次数
1 回答
0

If you're trying to check for some existing resources into CF, it is unfortunately not available. Instead you can use conditions and control the resource creation. For log groups in the first iteration you could delete the log group and provision the stack, from the next iteration it would be update operation so there would be no issues.

profile picture
AGS
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容