Skip to content

Commit ced56be

Browse files
committed
fix: support IP6 AAAA record
1 parent 3968dcf commit ced56be

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

packages/cdkConstructs/src/constructs/RestApiGateway.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ import {accessLogFormat} from "./RestApiGateway/accessLogFormat.js"
2424
import {Certificate, CertificateValidation} from "aws-cdk-lib/aws-certificatemanager"
2525
import {Bucket} from "aws-cdk-lib/aws-s3"
2626
import {BucketDeployment, Source} from "aws-cdk-lib/aws-s3-deployment"
27-
import {ARecord, HostedZone, RecordTarget} from "aws-cdk-lib/aws-route53"
27+
import {
28+
ARecord,
29+
AaaaRecord,
30+
HostedZone,
31+
RecordTarget
32+
} from "aws-cdk-lib/aws-route53"
2833
import {ApiGateway as ApiGatewayTarget} from "aws-cdk-lib/aws-route53-targets"
2934
import {NagSuppressions} from "cdk-nag"
3035
import {ACCOUNT_RESOURCES, LAMBDA_RESOURCES} from "../constants"
@@ -245,6 +250,12 @@ export class RestApiGateway extends Construct {
245250
zone: hostedZone
246251
})
247252

253+
new AaaaRecord(this, "AaaaRecord", {
254+
recordName: props.stackName,
255+
target: RecordTarget.fromAlias(new ApiGatewayTarget(apiGateway)),
256+
zone: hostedZone
257+
})
258+
248259
const cfnStage = apiGateway.deploymentStage.node.defaultChild as CfnStage
249260
cfnStage.cfnOptions.metadata = {
250261
guard: {

0 commit comments

Comments
 (0)