Skip to content

Commit 4d1ce52

Browse files
authored
Fix: [AEA-0000] - add int and prod cpt domains (#1244)
## Summary - Routine Change ### Details - add int and prod cpt domains
1 parent 4d6d9a3 commit 4d1ce52

2 files changed

Lines changed: 71 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ show-eps-route-53-nameservers: guard-env
145145
--stack-name eps-route53-resources \
146146
--query "Stacks[*].Outputs[?OutputKey=='NameServers'].{OutputKey: OutputKey, OutputValue: OutputValue, Description: Description}" \
147147
--profile prescription-$${env}
148+
aws cloudformation describe-stacks \
149+
--stack-name eps-route53-resources \
150+
--query "Stacks[*].Outputs[?OutputKey=='IntCPTNameServers'].{OutputKey: OutputKey, OutputValue: OutputValue, Description: Description}" \
151+
--profile prescription-$${env}
152+
aws cloudformation describe-stacks \
153+
--stack-name eps-route53-resources \
154+
--query "Stacks[*].Outputs[?OutputKey=='ProdCPTNameServers'].{OutputKey: OutputKey, OutputValue: OutputValue, Description: Description}" \
155+
--profile prescription-$${env}
148156

149157
cfn-guard:
150158
./scripts/run_cfn_guard.sh

cloudformation/eps_environment_route53.yml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ Parameters:
55
Description: >
66
Environment we are creating route 53 hosted zone in
77
AllowedValues: [dev, ref, qa, int, prod]
8-
8+
Conditions:
9+
CreateProdCPTDomain: !Equals
10+
- !Ref environment
11+
- prod
12+
CreateIntCPTDomain: !Equals
13+
- !Ref environment
14+
- int
915
Resources:
1016
DNSRecordHostedZoneEPS:
1117
Type: "AWS::Route53::HostedZone"
@@ -18,6 +24,26 @@ Resources:
1824
- Domain: !Join [".", [!Ref environment, "eps.national.nhs.uk"]]
1925
Name: !Join [".", [!Ref environment, "eps.national.nhs.uk"]]
2026

27+
CPTProdDNSRecordHostedZone:
28+
Type: "AWS::Route53::HostedZone"
29+
Condition: CreateProdCPTDomain
30+
DeletionPolicy: Retain
31+
UpdateReplacePolicy: Delete
32+
Properties:
33+
HostedZoneConfig:
34+
Comment: "hosted zone for prescriptiontracker.nhs.uk"
35+
Name: prescriptiontracker.nhs.uk
36+
37+
CPTIntDNSRecordHostedZone:
38+
Type: "AWS::Route53::HostedZone"
39+
Condition: CreateIntCPTDomain
40+
DeletionPolicy: Retain
41+
UpdateReplacePolicy: Delete
42+
Properties:
43+
HostedZoneConfig:
44+
Comment: "hosted zone for int-prescriptiontracker.nhs.uk"
45+
Name: int-prescriptiontracker.nhs.uk
46+
2147
Outputs:
2248
ZoneID:
2349
Description: The ZoneID of the hosted zone
@@ -34,3 +60,39 @@ Outputs:
3460
Value: !Join
3561
- ", "
3662
- !GetAtt DNSRecordHostedZoneEPS.NameServers
63+
ProdCPTZoneID:
64+
Description: The ZoneID of the PROD CPT hosted zone
65+
Condition: CreateProdCPTDomain
66+
Value: !Ref CPTProdDNSRecordHostedZone
67+
Export:
68+
Name: !Join [":", [!Ref "AWS::StackName", "CPT-ZoneID"]]
69+
ProdCPTdomain:
70+
Description: The domain of the PROD CPT hosted zone
71+
Condition: CreateProdCPTDomain
72+
Value: prescriptiontracker.nhs.uk
73+
Export:
74+
Name: !Join [":", [!Ref "AWS::StackName", "CPT-domain"]]
75+
ProdCPTNameServers:
76+
Description: The name servers of the PROD CPT hosted zone
77+
Condition: CreateProdCPTDomain
78+
Value: !Join
79+
- ", "
80+
- !GetAtt CPTProdDNSRecordHostedZone.NameServers
81+
IntCPTZoneID:
82+
Description: The ZoneID of the INT CPT hosted zone
83+
Condition: CreateIntCPTDomain
84+
Value: !Ref CPTIntDNSRecordHostedZone
85+
Export:
86+
Name: !Join [":", [!Ref "AWS::StackName", "CPT-ZoneID"]]
87+
IntCPTdomain:
88+
Description: The domain of the INT CPT hosted zone
89+
Condition: CreateIntCPTDomain
90+
Value: int-prescriptiontracker.nhs.uk
91+
Export:
92+
Name: !Join [":", [!Ref "AWS::StackName", "CPT-domain"]]
93+
IntCPTNameServers:
94+
Description: The name servers of the INT CPT hosted zone
95+
Condition: CreateIntCPTDomain
96+
Value: !Join
97+
- ", "
98+
- !GetAtt CPTIntDNSRecordHostedZone.NameServers

0 commit comments

Comments
 (0)