Add DNS propgation

This commit is contained in:
2019-11-10 20:02:43 -05:00
parent 71710d40c9
commit de3a8b7ce9
2 changed files with 85 additions and 0 deletions

View File

@ -99,12 +99,37 @@ Parameters:
Type: String
Description: The CIDR used in the security group to secure the database
Default: "0.0.0.0/0"
Domain:
Type: String
Description: The domain to create the endpoint on (Must have an existing hosted zone ex. `example.com`) Leave blank to skip DNS.
Default: ""
SubDomain:
Type: String
Description: The subdomain to be used by nakama. (ex. `nakama.example.com`)
Default: nakama
Conditions:
CreateRdsStack: !Equals [!Ref CreateDatabase, "true"]
CreateDns: !Not [!Equals [!Ref Domain, ""]]
Resources:
#-----
# DNS
#-----
DnsRecords:
Condition: CreateDns
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: !Sub 'https://s3.${AWS::Region}.amazonaws.com/sumu-stacks/nakama/${release}/cloudformation/nakama/dns.yaml'
Parameters:
environment: !Ref environment
Domain: !Ref Domain
SubDomain: !Ref SubDomain
NakamaDns: !GetAtt PublicNLB.DNSName
AdminDns: !GetAtt PublicALB.DNSName
#----------
# Database
#----------