-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(route53): add fromPrivateHostedZoneAttributes function to PrivateHostedZone #35552
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1d57dc9
feat(route53):Add fromPrivateHostedZoneAttributes function to Private…
tnb-git d98a09b
feat(route53):Add IntegTest For fromPrivateHostedZoneAttributes function
tnb-git cd77c6d
Merge branch 'aws:main' into feature/issue-23268
tnb-git 77c3e65
fix: address review comments
tnb-git 1116115
Merge branch 'main' into feature/issue-23268
abidhasan-aws 9c43284
Merge branch 'main' into feature/issue-23268
abidhasan-aws 8877583
Merge branch 'main' into feature/issue-23268
aemada-aws 1bd80aa
Merge branch 'main' into feature/issue-23268
mergify[bot] 26b402c
Merge branch 'main' into feature/issue-23268
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import { Construct } from 'constructs'; | ||
| import { HostedZoneProviderProps } from './hosted-zone-provider'; | ||
| import { HostedZoneAttributes, IHostedZone, PublicHostedZoneAttributes } from './hosted-zone-ref'; | ||
| import { HostedZoneAttributes, IHostedZone, PublicHostedZoneAttributes, PrivateHostedZoneAttributes } from './hosted-zone-ref'; | ||
| import { IKeySigningKey, KeySigningKey } from './key-signing-key'; | ||
| import { CaaAmazonRecord, ZoneDelegationRecord } from './record-set'; | ||
| import { CfnHostedZone, CfnDNSSEC, CfnKeySigningKey } from './route53.generated'; | ||
|
|
@@ -314,7 +314,7 @@ export interface PublicHostedZoneProps extends CommonHostedZoneProps { | |
| /** | ||
| * Represents a Route 53 public hosted zone | ||
| */ | ||
| export interface IPublicHostedZone extends IHostedZone {} | ||
| export interface IPublicHostedZone extends IHostedZone { } | ||
|
|
||
| /** | ||
| * Create a Route53 public hosted zone. | ||
|
|
@@ -481,7 +481,7 @@ export interface PrivateHostedZoneProps extends CommonHostedZoneProps { | |
| /** | ||
| * Represents a Route 53 private hosted zone | ||
| */ | ||
| export interface IPrivateHostedZone extends IHostedZone {} | ||
| export interface IPrivateHostedZone extends IHostedZone { } | ||
|
||
|
|
||
| /** | ||
| * Create a Route53 private hosted zone for use in one or more VPCs. | ||
|
|
@@ -520,6 +520,29 @@ export class PrivateHostedZone extends HostedZone implements IPrivateHostedZone | |
| return new Import(scope, id); | ||
| } | ||
|
|
||
| /** | ||
| * Imports a private hosted zone from another stack. | ||
| * | ||
| * Use when both hosted zone ID and hosted zone name are known. | ||
| * | ||
| * @param scope the parent Construct for this Construct | ||
| * @param id the logical name of this Construct | ||
| * @param attrs the PrivateHostedZoneAttributes (hosted zone ID and hosted zone name) | ||
| */ | ||
| public static fromPrivateHostedZoneAttributes(scope: Construct, id: string, attrs: PrivateHostedZoneAttributes): IPrivateHostedZone { | ||
| class Import extends Resource implements IPrivateHostedZone { | ||
| public readonly hostedZoneId = attrs.hostedZoneId; | ||
| public readonly zoneName = attrs.zoneName; | ||
| public get hostedZoneArn(): string { | ||
| return makeHostedZoneArn(this, this.hostedZoneId); | ||
| } | ||
| public grantDelegation(grantee: iam.IGrantable): iam.Grant { | ||
| return makeGrantDelegation(grantee, this.hostedZoneArn); | ||
| } | ||
| } | ||
| return new Import(scope, id); | ||
| } | ||
|
|
||
| constructor(scope: Construct, id: string, props: PrivateHostedZoneProps) { | ||
| super(scope, id, props); | ||
| // Enhanced CDK Analytics Telemetry | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a whitespace change. Could you please revert this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have addressed the whitespace change as requested.