Skip to content

CrossAccountZoneDelegationRecord: Validation fails for public and private hosted zone with the same name #30262

@ENM185

Description

@ENM185

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:

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:

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

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-route53Related to Amazon Route 53bugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions