I have a sort of circular dependancy question basi...
# help
d
I have a sort of circular dependancy question basically I have an Auth stack and a NextJS stack. They are both using custom domains with prefixes
<http://auth.staging.site.com|auth.staging.site.com>
and
<http://staging.site.com|staging.site.com>
however Rout53 requires that an A record exist for a subdomain before it can create a nested sub-domain. The NextJS stack relies on parameters from the Auth stack so I cant just deploy the NextJS site first. When I add a temporary A record entry for
<http://staging.site.com|staging.site.com>
the auth stack deploys fine however the NextJS stack fails saying it couldn't create the domain A record because one already exists. Does anyone have any ideas on how to get around this?
I have gotten around it by deploying the Auth stack with a dummy A record then deleting that record and deploy the NextJS stack, its all just a bit cumbersome.
t
That does seem cumbersome, because you know what domain will be created can you not configure that first in your js/ts code then use those values in the auth stack?