From 1f7ad339de961309c7afdf073b2c5eb749465d0a Mon Sep 17 00:00:00 2001 From: Patrick Ufer <46608534+patrickufer@users.noreply.github.com> Date: Wed, 6 Mar 2024 10:30:19 -0500 Subject: [PATCH] spread dns record overrides into props (#206) --- src/NextjsDomain.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/NextjsDomain.ts b/src/NextjsDomain.ts index 877fcc38..946549e0 100644 --- a/src/NextjsDomain.ts +++ b/src/NextjsDomain.ts @@ -165,8 +165,14 @@ export class NextjsDomain extends Construct { zone: this.hostedZone, target: RecordTarget.fromAlias(new CloudFrontTarget(distribution)), }; - new ARecord(this, 'ARecordMain', recordProps); // IPv4 - new AaaaRecord(this, 'AaaaRecordMain', recordProps); // IPv6 + new ARecord(this, 'ARecordMain', { + ...recordProps, + ...this.props.overrides?.aRecordProps, + }); // IPv4 + new AaaaRecord(this, 'AaaaRecordMain', { + ...recordProps, + ...this.props.overrides?.aaaaRecordProps, + }); // IPv6 if (this.props.alternateNames?.length) { let i = 1; for (const alternateName of this.props.alternateNames) {