Skip to content

Commit

Permalink
fix(route53): delegation fails with public and private hosted zones w…
Browse files Browse the repository at this point in the history
…ith same name (#30439)

### Issue # (if applicable)

Closes #30262.

### Reason for this change

Route53 does not support subdomain delegation on Private Hosted Zones ([source](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-considerations.html#hosted-zone-private-considerations-delegating-subdomain)). `CrossAccountZoneDelegationRecord` should ignore Private Hosted Zones instead of throwing error.

### Description of changes

In `CrossAccountZoneDelegationRecord` handler, filter out Private Hosted Zones.

### Description of how you validated changes

Deployed a stack that uses the updated `CrossAccountZoneDelegationRecord` handler where the parent account has both public and private hosted zones with the same domain name.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
samson-keung committed Jun 11, 2024
1 parent e19d18b commit 1f866c9
Show file tree
Hide file tree
Showing 24 changed files with 2,053 additions and 33 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-234567890123-af-south-1",
"S3Key": "df3b0c6a1a1c298cd483caec10a008f70e053a49a8472aa907dfa3021fed2bd6.zip"
"S3Key": "862d20f925bec1059342f4a1a7717b3c20bd77ffd1c2c38fadbf6f3e766cc87f.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-234567890123-af-south-1",
"S3Key": "df3b0c6a1a1c298cd483caec10a008f70e053a49a8472aa907dfa3021fed2bd6.zip"
"S3Key": "862d20f925bec1059342f4a1a7717b3c20bd77ffd1c2c38fadbf6f3e766cc87f.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-234567890123-us-east-1",
"S3Key": "df3b0c6a1a1c298cd483caec10a008f70e053a49a8472aa907dfa3021fed2bd6.zip"
"S3Key": "862d20f925bec1059342f4a1a7717b3c20bd77ffd1c2c38fadbf6f3e766cc87f.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

0 comments on commit 1f866c9

Please sign in to comment.