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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南