Skip to content

Instantly share code, notes, and snippets.

@toshke
Created November 30, 2020 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toshke/5546406ddb888872fba574c2bc1b4879 to your computer and use it in GitHub Desktop.
Save toshke/5546406ddb888872fba574c2bc1b4879 to your computer and use it in GitHub Desktop.
Conditional Custom Resource
Parameters:
DeployCustomResource:
Type: String
Default: false
AllowedValues: [true, false]
Conditions:
DeployCustomResource: !Equals [ !Ref DeployCustomResource, 'true' ]
Resources:
# .. other definitions including backing lambda
MyCustomResource:
Condition: DeployCustomResource
Properties:
Token: !GetAtt CustomResourceLambda.Arn
#.. other properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment