Skip to content

Commit

Permalink
add dns records for other environments (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-nhs authored Aug 1, 2023
1 parent 273651c commit 006a86f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cloudformation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ aws cloudformation deploy \
--template-file cloudformation/environment_route53.yml \
--stack-name route53-resources \
--region eu-west-2 \
--parameter-overrides ParameterKey=environment,ParameterValue=<ENVIRONENT NAME>
--parameter-overrides environment=<ENVIRONMENT>
```
4 changes: 3 additions & 1 deletion cloudformation/environment_route53.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Resources:
Type: "AWS::Route53::HostedZone"
Properties:
HostedZoneConfig:
Comment: !Sub "My hosted zone for ${!Join ['.', [!Ref environment, !Ref hostedZone]]}"
Comment: !Sub
- "My hosted zone for ${Domain}"
- Domain: !Join [".", [!Ref environment, !Ref hostedZone]]
Name: !Join [".", [!Ref environment, !Ref hostedZone]]

Outputs:
Expand Down
48 changes: 48 additions & 0 deletions cloudformation/management_route53.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,51 @@ Resources:
"ns-1854.awsdns-39.co.uk",
]
DependsOn: Zone

nsQAHostedZoneRecordSet:
Type: "AWS::Route53::RecordSet"
Properties:
HostedZoneId: !Ref Zone
Name: !Join [".", ["qa", !Ref hostedZone, ""]]
Type: NS
TTL: "900"
ResourceRecords:
[
"ns-498.awsdns-62.com",
"ns-1935.awsdns-49.co.uk",
"ns-816.awsdns-38.net",
"ns-1174.awsdns-18.org",
]
DependsOn: Zone

nsIntHostedZoneRecordSet:
Type: "AWS::Route53::RecordSet"
Properties:
HostedZoneId: !Ref Zone
Name: !Join [".", ["int", !Ref hostedZone, ""]]
Type: NS
TTL: "900"
ResourceRecords:
[
"ns-319.awsdns-39.com",
"ns-1202.awsdns-22.org",
"ns-1915.awsdns-47.co.uk",
"ns-947.awsdns-54.net",
]
DependsOn: Zone

nsRefHostedZoneRecordSet:
Type: "AWS::Route53::RecordSet"
Properties:
HostedZoneId: !Ref Zone
Name: !Join [".", ["ref", !Ref hostedZone, ""]]
Type: NS
TTL: "900"
ResourceRecords:
[
"ns-1019.awsdns-63.net",
"ns-1360.awsdns-42.org",
"ns-28.awsdns-03.com",
"ns-1854.awsdns-39.co.uk",
]
DependsOn: Zone

0 comments on commit 006a86f

Please sign in to comment.