Skip to content
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

feat(route53): add support for parentHostedZoneName for CrossAccountZoneDelegationRecord #14097

Merged
merged 3 commits into from
Apr 27, 2021
Merged

feat(route53): add support for parentHostedZoneName for CrossAccountZoneDelegationRecord #14097

merged 3 commits into from
Apr 27, 2021

Conversation

ayush987goyal
Copy link
Contributor

@ayush987goyal ayush987goyal commented Apr 10, 2021

feat(route53): add support for parentHostedZoneName for CrossAccountZoneDelegationRecord

  1. Zone name lookup:

The current implementation of CrossAccountZoneDelegationRecord requires users to pass the parentHostedZoneId which is not so easy since we cannot pass references cross account.

This implementation lets them pass the zone name and queries the route53 API to get the zoneId.

  1. Delegation role name addition

The ARN of the delegation role cannot be passed around to stacks since they will have different environments (this is cross account delegation and CDK does not allow passing references across environments).

This means that users need to import the delegation role in the stack containing the child zone. Since it needs to be imported, the users would need the role ARN. Now this ARN can either be hard-coded or constructed. Hard-coding the ARN is not entirely feasible since that would require deploying the parent stack first, then making code change and then deploying child stack in pipelines.

With role name, the ARN can be easily constructed (refer readme for importing role) and it provides a better user experience.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Apr 10, 2021

@github-actions github-actions bot added the @aws-cdk/aws-route53 Related to Amazon Route 53 label Apr 10, 2021
@ayush987goyal
Copy link
Contributor Author

@njlynch This is the follow up to the previous change for CrossAccountZoneDelegationRecord. The current change is causing more confusion and is difficult for people to use.

@njlynch njlynch added effort/small Small work item – less than a day of effort p1 labels Apr 14, 2021
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, and thanks for this contribution!

The PR includes motivation for the zone name lookup, but not the role name addition. Can you expand a bit on the motivation here, including any feedback you've gotten on it?

Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new comments, just appropriately marking as "request changes" so my queue's updated. :)

@mergify mergify bot dismissed njlynch’s stale review April 27, 2021 10:15

Pull request has been modified.

@ayush987goyal ayush987goyal requested a review from njlynch April 27, 2021 10:17
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: ff7ed3f
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 572ee40 into aws:master Apr 27, 2021
@ayush987goyal ayush987goyal deleted the pr/cross-record branch April 27, 2021 11:26
john-tipper pushed a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
…oneDelegationRecord (aws#14097)

feat(route53): add support for parentHostedZoneName for CrossAccountZoneDelegationRecord

1. Zone name lookup: 

The current implementation of `CrossAccountZoneDelegationRecord` requires users to pass the `parentHostedZoneId` which is not so easy since we cannot pass references cross account.

This implementation lets them pass the zone name and queries the route53 API to get the zoneId.

2. Delegation role name addition

The ARN of the delegation role cannot be passed around to stacks since they will have different environments (this is cross account delegation and CDK does not allow passing references across environments).

This means that users need to import the delegation role in the stack containing the child zone. Since it needs to be imported, the users would need the role ARN. Now this ARN can either be hard-coded or constructed. Hard-coding the ARN is not entirely feasible since that would require deploying the parent stack first, then making code change and then deploying child stack in pipelines.

With role name, the ARN can be easily constructed (refer readme for importing role) and it provides a better user experience.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…oneDelegationRecord (aws#14097)

feat(route53): add support for parentHostedZoneName for CrossAccountZoneDelegationRecord

1. Zone name lookup: 

The current implementation of `CrossAccountZoneDelegationRecord` requires users to pass the `parentHostedZoneId` which is not so easy since we cannot pass references cross account.

This implementation lets them pass the zone name and queries the route53 API to get the zoneId.

2. Delegation role name addition

The ARN of the delegation role cannot be passed around to stacks since they will have different environments (this is cross account delegation and CDK does not allow passing references across environments).

This means that users need to import the delegation role in the stack containing the child zone. Since it needs to be imported, the users would need the role ARN. Now this ARN can either be hard-coded or constructed. Hard-coding the ARN is not entirely feasible since that would require deploying the parent stack first, then making code change and then deploying child stack in pipelines.

With role name, the ARN can be easily constructed (refer readme for importing role) and it provides a better user experience.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants