Skip to content

Commit 2cf2ca9

Browse files
committed
feat: IPv6 support
1 parent d2f2c60 commit 2cf2ca9

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/resources/Api.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,25 @@ export class Api {
277277

278278
merge(resources, {
279279
[domainRoute53Record]: {
280-
Type: 'AWS::Route53::RecordSet',
280+
Type: 'AWS::Route53::RecordSetGroup',
281281
DeletionPolicy: domain.retain ? 'Retain' : 'Delete',
282282
Properties: {
283283
...(domain.hostedZoneId
284284
? { HostedZoneId: domain.hostedZoneId }
285285
: { HostedZoneName: hostedZoneName }),
286-
Name: domain.name,
287-
Type: 'A',
288-
AliasTarget: {
289-
HostedZoneId: {
290-
'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
291-
},
292-
DNSName: {
293-
'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
294-
},
295-
EvaluateTargetHealth: false,
296-
},
286+
RecordSets: ['A', 'AAAA'].map(Type => ({
287+
Name: domain.name,
288+
Type,
289+
AliasTarget: {
290+
HostedZoneId: {
291+
'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
292+
},
293+
DNSName: {
294+
'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
295+
},
296+
EvaluateTargetHealth: false,
297+
}
298+
}))
297299
},
298300
},
299301
});

0 commit comments

Comments
 (0)