Skip to content

feat: IPv6 support#630

Open
iainmerrick wants to merge 1 commit into
sid88in:masterfrom
iainmerrick:master
Open

feat: IPv6 support#630
iainmerrick wants to merge 1 commit into
sid88in:masterfrom
iainmerrick:master

Conversation

@iainmerrick
Copy link
Copy Markdown

@iainmerrick iainmerrick commented Apr 26, 2024

  • turn Route53::RecordSet into a RecordSetGroup with additional AAAA record
  • change resource name to avoid type error when updating CloudFormation

Summary by CodeRabbit

  • New Features
    • Custom domains now support IPv6 through dual A and AAAA record creation, enhancing connectivity options for users with Route53-managed domains.

- turn Route53::RecordSet into a RecordSetGroup with additional AAAA record
- change resource name to avoid type error when updating CloudFormation
@sid88in
Copy link
Copy Markdown
Owner

sid88in commented May 31, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Route53 custom domain record generation is expanded to emit both IPv4 and IPv6 records. The CloudFormation resource type changes from AWS::Route53::RecordSet to AWS::Route53::RecordSetGroup, with both A and AAAA alias records included and the logical ID updated to reflect the plural form.

Changes

Route53 IPv6 Records

Layer / File(s) Summary
Route53 RecordSetGroup and logical ID
src/resources/Api.ts, src/resources/Naming.ts
Route53 custom domain records switch from AWS::Route53::RecordSet to AWS::Route53::RecordSetGroup, expanding to emit both A and AAAA alias records with the same AppSync domain target. The logical ID is updated from GraphQlDomainRoute53Record to GraphQlDomainRoute53Records.

🎯 2 (Simple) | ⏱️ ~8 minutes

A rabbit hops with glee so bright,
IPv6 records shining in the night,
From one A record, now two take flight,
AAAA joins in, making domains right! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: IPv6 support' accurately describes the main change - adding AAAA records for IPv6 support via Route53::RecordSetGroup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@sid88in sid88in self-requested a review May 31, 2026 20:08
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/resources/Api.ts`:
- Around line 286-298: The RecordSets mapping has lint failures: change the
arrow callback parameter to use parentheses in the map (i.e. use (Type) => ...)
and ensure trailing commas are added for the object literals returned by the map
— add a trailing comma after the AliasTarget object literal and after the mapped
record object so the RecordSets array elements and nested objects end with
commas (references: RecordSets, the map callback Type, domain.name,
domainNameLogicalId, AppSyncDomainName, HostedZoneId, EvaluateTargetHealth).

In `@src/resources/Naming.ts`:
- Line 39: The change of the CloudFormation logical ID from
GraphQlDomainRoute53Record to GraphQlDomainRoute53Records (in the return of
getLogicalId) will force replacement of the Route53 resource (switching from
AWS::Route53::RecordSet to AWS::Route53::RecordSetGroup) and can cause brief DNS
disruption; update the PR description, changelog, and migration guide to clearly
call out this breaking change, list the exact symbols affected
(GraphQlDomainRoute53Record -> GraphQlDomainRoute53Records and the getLogicalId
usage), describe the replacement behavior and expected DNS propagation delay,
and recommend that users plan upgrades during a maintenance window.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f542a86-f8ca-407f-8e96-ef7dbedd4dda

📥 Commits

Reviewing files that changed from the base of the PR and between e99c51a and 81e8477.

📒 Files selected for processing (2)
  • src/resources/Api.ts
  • src/resources/Naming.ts

Comment thread src/resources/Api.ts
Comment on lines +286 to +298
RecordSets: ['A', 'AAAA'].map(Type => ({
Name: domain.name,
Type,
AliasTarget: {
HostedZoneId: {
'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
},
DNSName: {
'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
},
EvaluateTargetHealth: false,
}
}))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix formatting issues to pass linter.

The arrow function and object literals have formatting issues that will cause prettier/linting to fail:

  • Line 286: Arrow function parameter needs parentheses
  • Lines 297-298: Missing trailing commas
🔧 Proposed fix for formatting
-            RecordSets: ['A', 'AAAA'].map(Type => ({
+            RecordSets: ['A', 'AAAA'].map((Type) => ({
               Name: domain.name,
               Type,
               AliasTarget: {
                 HostedZoneId: {
                   'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
                 },
                 DNSName: {
                   'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
                 },
-                EvaluateTargetHealth: false,
-              }
-            }))
+                EvaluateTargetHealth: false,
+              },
+            })),
           },

As per coding guidelines, the static analysis hints indicate these formatting violations must be addressed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
RecordSets: ['A', 'AAAA'].map(Type => ({
Name: domain.name,
Type,
AliasTarget: {
HostedZoneId: {
'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
},
DNSName: {
'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
},
EvaluateTargetHealth: false,
}
}))
RecordSets: ['A', 'AAAA'].map((Type) => ({
Name: domain.name,
Type,
AliasTarget: {
HostedZoneId: {
'Fn::GetAtt': [domainNameLogicalId, 'HostedZoneId'],
},
DNSName: {
'Fn::GetAtt': [domainNameLogicalId, 'AppSyncDomainName'],
},
EvaluateTargetHealth: false,
},
})),
🧰 Tools
🪛 ESLint

[error] 286-286: Replace Type with (Type)

(prettier/prettier)


[error] 297-297: Insert ,

(prettier/prettier)


[error] 298-298: Insert ,

(prettier/prettier)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/resources/Api.ts` around lines 286 - 298, The RecordSets mapping has lint
failures: change the arrow callback parameter to use parentheses in the map
(i.e. use (Type) => ...) and ensure trailing commas are added for the object
literals returned by the map — add a trailing comma after the AliasTarget object
literal and after the mapped record object so the RecordSets array elements and
nested objects end with commas (references: RecordSets, the map callback Type,
domain.name, domainNameLogicalId, AppSyncDomainName, HostedZoneId,
EvaluateTargetHealth).

Comment thread src/resources/Naming.ts

getDomainReoute53RecordLogicalId() {
return this.getLogicalId(`GraphQlDomainRoute53Record`);
return this.getLogicalId(`GraphQlDomainRoute53Records`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Breaking change: Logical ID modification will replace Route53 records.

Changing the CloudFormation logical ID from GraphQlDomainRoute53Record to GraphQlDomainRoute53Records will cause CloudFormation to replace the Route53 resource during stack updates. This means:

  1. A new RecordSetGroup will be created
  2. The old RecordSet will be deleted
  3. Brief DNS propagation delays may occur during the transition

This is intentional to switch from AWS::Route53::RecordSet to AWS::Route53::RecordSetGroup, but users upgrading to this version should be aware of potential brief DNS disruption.

Recommendation: Document this breaking change in the PR description, changelog, or migration guide so users can plan the upgrade during a maintenance window if needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/resources/Naming.ts` at line 39, The change of the CloudFormation logical
ID from GraphQlDomainRoute53Record to GraphQlDomainRoute53Records (in the return
of getLogicalId) will force replacement of the Route53 resource (switching from
AWS::Route53::RecordSet to AWS::Route53::RecordSetGroup) and can cause brief DNS
disruption; update the PR description, changelog, and migration guide to clearly
call out this breaking change, list the exact symbols affected
(GraphQlDomainRoute53Record -> GraphQlDomainRoute53Records and the getLogicalId
usage), describe the replacement behavior and expected DNS propagation delay,
and recommend that users plan upgrades during a maintenance window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants