-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(route53): CrossAccountZoneDelegationRecord
does not remove old NS records when the zoneName
changes
#21249
Comments
Ping @ayush987goyal, @phoefflin |
Yeah seems like a bug to me. We might need a separate handler for the UPDATE case perhaps and some corresponding refactoring. One callout is that the current implementation should technically work since it would still add the nameservers for the new hosted zone name. |
Hi! I would like to come this issue alive again as I'm also being affected by the same issue. As @moltar described, if the |
Looks like the issue is still present, and it's currently reproducing for me with CDK 2.40.0 (build 56ba2ab). |
I've just republished the #27523 pull request adding the missing integration tests from previous one. |
…ing (aws#21249) Signed-off-by: Sergio García Prado <sergio@garciparedes.me>
…ing (#21249) (#27523) …ing (#21249) Improve the `CustomResource` implementation that manages the `Route53`'s `NS` Records on the Account that host the parent `HostedZone` to consider renaming cases in which updates and deletes are both required. Closes #21249. This is related to #25285 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…ing (#21249) (#27523) …ing (#21249) Improve the `CustomResource` implementation that manages the `Route53`'s `NS` Records on the Account that host the parent `HostedZone` to consider renaming cases in which updates and deletes are both required. Closes #21249. This is related to #25285 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
When changing the
zoneName
value of thePublicHostedZone
the old NS entries in the delegated zone are not removed.I think this is because when the logical ID did not change, the custom resource event type is still
UPDATE
and judging by the handler code, it does not handle this edge case.aws-cdk/packages/@aws-cdk/aws-route53/lib/cross-account-zone-delegation-handler/index.ts
Lines 25 to 51 in cea1039
Expected Behavior
Old NS records to be removed.
Current Behavior
NS records remain in the delegated (parent) zone.
Reproduction Steps
Deploy:
Then change
zoneName
value toabc2.example.com
and deploy again.Observe that NS records for
abc.example.com
remain.Possible Solution
Compare
zoneName
values with the existing resource and delete it when the name chagnes.Additional Information/Context
No response
CDK CLI Version
2.29.1 (build c42e961)
Framework Version
TS
Node.js Version
v14.19.3
OS
macOS
Language
Typescript
Language Version
TS 4.7.4
Other information
No response
The text was updated successfully, but these errors were encountered: