Deadron
Deadron

Reputation: 5289

How do I resolve a Hosted Zone from a CfnParameter value?

I am working on a CDK script that is executed as a part of a Copilot application as an addon. The overall application is configured with a root url that is setup as a Hosted Zone in the same aws account. My template is attempting to add a new DNS record to that hosted zone. The issue is that at synth time I don't know the url of the hosted zone since its based on the app name and env name. Those are passed into my template as parameters. None of the HostedZone lookup methods appear to work with parameters though. I need to be able to translate the domain name into a hosted zone id when its deployed. Frustratingly, because the template is run by copilot its not easy to parameterize the executed CDK code.

Upvotes: 0

Views: 41

Answers (0)

Related Questions