@@ -25,6 +25,7 @@ Parameters:
2525
2626Conditions :
2727 IsProd : !Equals [!Ref RunEnvironment, 'prod']
28+ IsDev : !Equals [!Ref RunEnvironment, 'dev']
2829 ShouldAttachVpc :
2930 !Equals [true, !Ref VpcRequired]
3031
@@ -39,10 +40,14 @@ Mappings:
3940 ApiCertificateArn : arn:aws:acm:us-east-1:427040638965:certificate/63ccdf0b-d2b5-44f0-b589-eceffb935c23
4041 HostedZoneId : Z04502822NVIA85WM2SML
4142 ApiDomainName : " aws.qa.acmuiuc.org"
43+ LinkryApiDomainName : " aws.qa.acmuiuc.org"
44+ LinkryApiCertificateArn : arn:aws:acm:us-east-1:427040638965:certificate/63ccdf0b-d2b5-44f0-b589-eceffb935c23
4245 prod :
4346 ApiCertificateArn : arn:aws:acm:us-east-1:298118738376:certificate/6142a0e2-d62f-478e-bf15-5bdb616fe705
4447 HostedZoneId : Z05246633460N5MEB9DBF
45- ApiDomainName : " aws.acmuiuc.org" # CHANGE ME
48+ ApiDomainName : " aws.acmuiuc.org"
49+ LinkryApiDomainName : " acm.illinois.edu"
50+ LinkryApiCertificateArn : arn:aws:acm:us-east-1:298118738376:certificate/a902d70d-1991-400e-8be9-65befa8fa324
4651 EnvironmentToCidr :
4752 dev :
4853 SecurityGroupIds :
@@ -93,7 +98,7 @@ Resources:
9398 Environment :
9499 Variables :
95100 RunEnvironment : !Ref RunEnvironment
96- VpcConfig :
101+ VpcConfig :
97102 Ipv6AllowedForDualStack : !If [ShouldAttachVpc, True, !Ref AWS::NoValue]
98103 SecurityGroupIds : !If [ShouldAttachVpc, !FindInMap [EnvironmentToCidr, !Ref RunEnvironment, SecurityGroupIds], !Ref AWS::NoValue]
99104 SubnetIds : !If [ShouldAttachVpc, !FindInMap [EnvironmentToCidr, !Ref RunEnvironment, SubnetIds], !Ref AWS::NoValue]
@@ -107,7 +112,7 @@ Resources:
107112
108113 IamGroupRolesTable :
109114 Type : ' AWS::DynamoDB::Table'
110- DeletionPolicy : " Retain"
115+ DeletionPolicy : " Retain"
111116 Properties :
112117 BillingMode : ' PAY_PER_REQUEST'
113118 TableName : infra-core-api-iam-grouproles
@@ -123,7 +128,7 @@ Resources:
123128
124129 IamUserRolesTable :
125130 Type : ' AWS::DynamoDB::Table'
126- DeletionPolicy : " Retain"
131+ DeletionPolicy : " Retain"
127132 Properties :
128133 BillingMode : ' PAY_PER_REQUEST'
129134 TableName : infra-core-api-iam-userroles
@@ -139,7 +144,7 @@ Resources:
139144
140145 EventRecordsTable :
141146 Type : ' AWS::DynamoDB::Table'
142- DeletionPolicy : " Retain"
147+ DeletionPolicy : " Retain"
143148 Properties :
144149 BillingMode : ' PAY_PER_REQUEST'
145150 TableName : infra-core-api-events
@@ -164,7 +169,7 @@ Resources:
164169
165170 CacheRecordsTable :
166171 Type : ' AWS::DynamoDB::Table'
167- DeletionPolicy : " Retain"
172+ DeletionPolicy : " Retain"
168173 Properties :
169174 BillingMode : ' PAY_PER_REQUEST'
170175 TableName : infra-core-api-cache
@@ -183,7 +188,7 @@ Resources:
183188
184189 AppApiGateway :
185190 Type : AWS::Serverless::Api
186- DependsOn :
191+ DependsOn :
187192 - AppApiLambdaFunction
188193 Properties :
189194 Name : !Sub ${ApplicationPrefix}-gateway
@@ -194,7 +199,7 @@ Resources:
194199 Name : AWS::Include
195200 Parameters :
196201 Location : ./phony-swagger.yml
197- Domain :
202+ Domain :
198203 DomainName : !Sub
199204 - " ${ApplicationPrefix}.${BaseDomainName}"
200205 - BaseDomainName : !FindInMap
@@ -296,4 +301,32 @@ Resources:
296301 - !Ref AWS::AccountId
297302 - " :"
298303 - !Ref AppApiGateway
299- - " /*/*/*"
304+ - " /*/*/*"
305+
306+ LinkryCustomDomainName :
307+ Type : AWS::ApiGateway::DomainName
308+ Properties :
309+ CertificateArn : !FindInMap [ApiGwConfig, !Ref RunEnvironment, LinkryApiCertificateArn]
310+ DomainName : !Sub
311+ - " go.${BaseDomainName}"
312+ - BaseDomainName : !FindInMap
313+ - ApiGwConfig
314+ - !Ref RunEnvironment
315+ - LinkryApiDomainName
316+ SecurityPolicy : TLS_1_2
317+
318+ LinkryRoute53RecordSetDev :
319+ Condition : IsDev
320+ Type : AWS::Route53::RecordSet
321+ Properties :
322+ HostedZoneId : !FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId]
323+ Name : !Sub
324+ - " go.${BaseDomainName}"
325+ - BaseDomainName : !FindInMap
326+ - ApiGwConfig
327+ - !Ref RunEnvironment
328+ - LinkryApiDomainName
329+ Type : A
330+ AliasTarget :
331+ DNSName : !GetAtt LinkryCustomDomainNameDev.RegionalDomainName
332+ HostedZoneId : !GetAtt LinkryCustomDomainNameDev.RegionalHostedZoneId
0 commit comments