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
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:
aws-cdk/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/cross-account-zone-delegation-handler/index.ts
Line 79 in 623cedb
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:
aws-cdk/packages/@aws-cdk/custom-resource-handlers/lib/aws-route53/cross-account-zone-delegation-handler/index.ts
Line 79 in 623cedb
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