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

feita há um ano242 visualizações
1 Resposta
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
respondido há 9 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas