Skip to content

(route53): PrivateHostedZone fromPrivateHostedZoneAttributes function with zoneName support #23268

@aamielsan

Description

@aamielsan

Describe the feature

Same as the PublicHostedZone.fromPublicHostedZoneAttributes we would like to resolve an IPrivateHostedZone from a zone ID and zone name.

Currently, we can import a private hosted zone using PrivateHostedZone.fromPrivateHostedZoneId, but this will not allow us to reference the zoneName in CDK which is needed for our use case.

Use Case

We have a use case where we're creating record sets using CfnRecordSet for an imported private hosted zone. We created a custom construct that takes a IPrivateHostedZone as a parameter, and we need the zone name to create the full subdomain name in the custom construct. We could use IHostedZone but would like to be strict and only have the custom construct to accept IPrivateHostedZone

Proposed Solution

Use the same implementation for PublicHostedZone.fromPublicHostedZoneAttributes

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.47.0

Environment details (OS name and version, etc.)

MacOS Monterey

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-route53Related to Amazon Route 53effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions