Skip to content

Instantly share code, notes, and snippets.

@TheDanBlanco
Last active October 6, 2023 20:43
Show Gist options
  • Save TheDanBlanco/5726449cb0c1243c994652c2edea66ce to your computer and use it in GitHub Desktop.
Save TheDanBlanco/5726449cb0c1243c994652c2edea66ce to your computer and use it in GitHub Desktop.
Deletion Policy condition example
Parameters:
Environment:
Type: String
Default: dev
Description: Environment name, e.g. dev, test, prod
Conditions:
IsProd: !Equals [!Ref Environment, "prod"]
Resources:
WaitHandle:
Type: AWS::CloudFormation::WaitConditionHandle
DeletionPolicy: !If [IsProd, Retain, Delete]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment