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年前240ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ