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

fix(route53): publichostedzone import returns IHostedZone instead of IPublicHostedZone #21007

Merged
merged 2 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('tests', () => {
const endpointService = new ec2.VpcEndpointService(stack, 'EndpointService', { vpcEndpointServiceLoadBalancers: [nlb] });

// WHEN
const importedPHZ = route53.PublicHostedZone.fromHostedZoneAttributes(stack, 'MyPHZ', {
const importedPHZ = route53.PublicHostedZone.fromPublicHostedZoneAttributes(stack, 'MyPHZ', {
hostedZoneId: 'sampleid',
zoneName: 'MyZone',
});
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-route53/lib/hosted-zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ export class PublicHostedZone extends HostedZone implements IPublicHostedZone {
* @param id the logical name of this Construct
* @param attrs the PublicHostedZoneAttributes (hosted zone ID and hosted zone name)
*/
public static fromPublicHostedZoneAttributes(scope: Construct, id: string, attrs: PublicHostedZoneAttributes): IHostedZone {
class Import extends Resource implements IHostedZone {
public static fromPublicHostedZoneAttributes(scope: Construct, id: string, attrs: PublicHostedZoneAttributes): IPublicHostedZone {
class Import extends Resource implements IPublicHostedZone {
public readonly hostedZoneId = attrs.hostedZoneId;
public readonly zoneName = attrs.zoneName;
public get hostedZoneArn(): string {
Expand Down