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

posta un anno fa242 visualizzazioni
1 Risposta
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
con risposta 9 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande