-
Notifications
You must be signed in to change notification settings - Fork 4.5k
CrossAccountZoneDelegationRecord: Validation fails for public and private hosted zone with the same name #30262
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-route53Related to Amazon Route 53Related to Amazon Route 53bugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1
Description
Describe the bug
CrossAccountZoneDelegationRecord complains about more than 1 matching zone when only one of them is public.
Expected Behavior
Validate that there is only one public hosted zone matching the name.
Current Behavior
Validates that there is only one (no filter by public) hosted zone matching the name. The logic is here:
Line 79 in 623cedb
| const zones = await route53.listHostedZonesByName({ DNSName: name }); |
Reproduction Steps
Create a public and private hosted zone in one account with the same name and then a CrossAccountZoneDelegationRecord in the other.
Possible Solution
Filter by public hosted zone here:
Line 79 in 623cedb
| const zones = await route53.listHostedZonesByName({ DNSName: name }); |
Additional Information/Context
No response
CDK CLI Version
2.136.0
Framework Version
No response
Node.js Version
8.19.4
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-route53Related to Amazon Route 53Related to Amazon Route 53bugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1