https://pulumi.com logo
#aws
Title
# aws
i

icy-controller-6092

05/04/2022, 3:24 AM
I’m following the instructions to add a custom domain to an api gateway, and it has me creating a new Route 53 hosted zone for “api.my.domain” … I’m running pulumi up, and now it’s taking a long time to validate an SSL cert because the DNS records don’t appear to be propagating. Is this because it’s a new zone, or could it be because I also have another hosted zone under “my.domain” ?
So it looks like this documentation is not great… https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/#custom-domains-and-ssl It says to just go ahead and create a
new aws.route53.Zone
but Route53 will allocate a new set of nameservers for the new zone, that will not match the existing nameservers that are already present in the “Registered domains” page
i.e. it conflicts with the existing “HostedZone created by Route53 Registrar”
I’ll try removing the Zone created by the documentation, and hard-code the zone ID for the existing zone
That worked 🚀
v

victorious-church-57397

05/04/2022, 9:48 AM
you can import the existing hosted zone using
pulumi import
then once pulumi is managing the resource you can pass the zoneid through programatically
i

icy-controller-6092

05/05/2022, 12:24 AM
Oh cool, thanks Joshy! If I import the zone into multiple projects (e.g. projectA.my.domain and projectB.my.domain) will that cause any issue?
v

victorious-church-57397

05/05/2022, 8:46 AM
Yeah I wouldn’t advise having the resource in multiple projects, this could cause real issues with state if being updated by both places. What’s the use case for wanting to have the zone in multiple projects?
i

icy-controller-6092

05/05/2022, 9:56 AM
Ah ok that makes sense, I suppose if you did have in all repos, 1 could delete it and affect the others. In my use case I have 3 repo’s and each needs its own subdomain, so there’s “api.xyz” “app.xyz” and “admin.xyz”. I’m hoping to define the subdomain resources (dns records, tls certs etc) in the relevant repository, but is there another way people tend to solve this problem?
v

victorious-church-57397

05/05/2022, 10:04 AM
ah ok so you just need the hosted zone id? you can manage it in a central project, and providing they all use the same pulumi backend, you can output the values of the hosted zone from project A, then use stack references to pull in the outputs from project A to project B and C
17 Views