@@ -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
915Resources :
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+
2147Outputs :
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