Skip to content

Commit

Permalink
Merge pull request #270 from Russ-K/issue/247/booleans
Browse files Browse the repository at this point in the history
Add validation for boolean CloudFormation template parameters
  • Loading branch information
echo-bravo-yahoo authored Jun 28, 2019
2 parents dc94f48 + 653b708 commit 64e820c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cloudformation/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,19 @@ Parameters:
Type: String
Description: Only applicable if creating a custom domain name for your dev portal. Defaults to false, and you'll need to provide your own nameserver hosting. If set to true, a Route53 HostedZone and RecordSet are created for you.
Default: 'false'
AllowedValues:
- 'false'
- 'true'
ConstraintDescription: Malformed input - Parameter UseRoute53Nameservers value must be either 'true' or 'false'

DevelopmentMode:
Type: String
Description: Enabling this weakens security features (OAI, SSL, site S3 bucket with public read ACLs, Cognito callback verification, CORS, etc.) for easier development. It also breaks frontend routing (except to /index.html), including deep linking and page refresh. Do not enable this in production! Additionally, do not update a stack that was previously in development mode to be a production stack; instead, make a new stack that has never been in development mode.
Default: 'false'
AllowedValues:
- 'false'
- 'true'
ConstraintDescription: Malformed input - Parameter DevelopmentMode value must be either 'true' or 'false'

Conditions:
UseCustomDomainName: !And [!And [!Not [!Equals [!Ref CustomDomainName, '']], !Not [!Equals [!Ref CustomDomainNameAcmCertArn, '']]], !Condition NotDevelopmentMode]
Expand Down

0 comments on commit 64e820c

Please sign in to comment.