in source/per-stage-dns/lib/dns-infrastructure-stack.ts [9:29]
constructor(scope: cdk.Construct, id: string, props: DNSInfrastructureStackProps) {
super(scope, id, props);
const stageDomainMapping = this.node.tryGetContext('stageDomainMapping');
const stageDomain = stageDomainMapping[props.stageName];
const hostedZone = new route53.PublicHostedZone(this, 'stageHostedZone', {zoneName: stageDomain});
if(hostedZone.hostedZoneNameServers){
new cdk.CfnOutput(this, `NS records`, {
value: cdk.Fn.join(",", hostedZone.hostedZoneNameServers),
});
}
new cdk.CfnOutput(this, `HostedZoneId`, {
value: hostedZone.hostedZoneId,
});
new cdk.CfnOutput(this, `HostedZoneArn`, {
value: hostedZone.hostedZoneArn,
});
}