-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] Support for cross account DNS delegation #8776
Comments
Any opinion here? Is there something missing from my side or should I just create a PR? |
@workeitel feel free to create a PR and put it into draft. I agree with you that |
Awesome! I'd love to see this feature in CDK! 👍 |
Hi @shivlaks , @workeitel I have created a draft PR for this. Could you please take a look? We still have to figure out some things related to testing (mentioned in the PR). Thanks! Update: Integration tests successful and this PR is now ready for review. |
feat(aws-route53): cross account DNS delegations closes #8776 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Right now CDK already supports cross stack Route53 delegations and even cross region delegations (since Route53 is a global service).
But with sub-zones it's not uncommon to have a root DNS account and delegating zones into the sub-accounts. It would be great if CDK could help creating the cross account delegation.
Use Case
Creating a global DNS structure across multiple accounts and delegating the regional zones into the right sub-accounts automatically.
Proposed Solution
Some ideas for the interface.
1. Same CFN stack (already works ✅)
2. Same account and region (already works ✅)
It uses CFN import/export to pass route53 zone id
stack 1
stack 2
3. Same account different region (already works ✅)
zone id passed via cdk context
stack 2
Variant 4.1. Different account - delegation by parent zone (🆕)
Hosted zone name servers needs to be passed from stack 2 to stack 1. Stack 1 puts delegation in place.
Downside: First Stack 2 needs to be synth but the hosted zone does not work yet because it can't be resolved (like for ACM DNS validation). Then Stack 1 needs to be deployed to put delegation in place. That creates an annoying dependency.
stack 1
stack 2
Variant 4.2 Different account - delegation by child zone (🆕)
Stack 1 creates a role which is allowed to be assumed by Stack 2 to put the delegation in place. Stack 2 requires a custom resource with a lambda function to assume the role and create delegation.
Downside is a custom CloudFormation resource is required to put the delegation in place. Also in case the un-delegate fails on delete a dangling delegation record would be left behind which can be a security problem.
stack 1
stack 2 - uses new
CrossAccountZoneDelegationRecord
constructI think 4.2 has clear advantages from usage perspective but is more difficult to implement because the custom resource is required.
I'm not super familiar if there is already a mechanism to pass references cross account/region. It looks like the existing system is restricted to same account/region?
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: