-
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
aws-cdk: Exporting/importing HostedZoneIds across CDK apps #30384
Comments
Update: I believe we can use a stack output in another cdk app. And use it in another app. with Fn.importValue |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the feature
Hello,
We have one CDK app that deploys a Hosted Zone and another CDK app that uses that Hosted Zone. Both are deployed in the same account.
Until now we've been using:
HostedZone.fromLookup()
The issue with
HostedZone.fromLookup()
is that it "hardcodes" the hosted zone id incdk.context.json
. This is not good for region build automation and we want to move away from having to create a code change every time we add a new region and it's hosted zones.HostedZone.fromAttributes
requires the HostedZoneId which is the same problem.Can we export the Hosted ZoneId in one cdk app and import it from another?
Thanks
More Details on what is currently supported in the CDK
As you can see here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.HostedZone.html#static-fromwbrhostedwbrzonewbrattributesscope-id-attrs
There are currently 3 ways to import a hosted zone from another cdk app. Each one of them has issues:
cdk.context.json
Other Information
See also
Acknowledgements
CDK version used
v2
Environment details (OS name and version, etc.)
typescript amazon-linux
The text was updated successfully, but these errors were encountered: