sparse-intern-71089
06/16/2021, 5:33 PMcolossal-plastic-46140
06/16/2021, 6:27 PMlemon-machine-35564
06/16/2021, 7:04 PMmillions-umbrella-34765
06/16/2021, 8:32 PM/Cloudformation project creates cloudformation url
const myDistribution = new aws.cloudfront.Distribution
//example12345.cloudfront.net.
//export this as a stack variable
pulumi.export("myDistribution", )
//point cloudfront to <http://example.com|example.com>
const cnameForCloudfront = new aws.route53.Record(
"myCname",
{
name: "foo",
records: [{myDistribution.domainName}],
ttl: 1800,
type: "CNAME",
zoneId: "Z1MS401EDN11234",
}
);
then in the Route53 project, it will define the same DNS record by stack reference to the CF distribution
//In the Route53 project
// cloudfront = new Pulumi.StackReference(`the-cloudfront-stack`))
//...other sub-domains are defined...
//point <http://foo.example.com|foo.example.com> to Cloudfront
const cnameForCloudfront = new aws.route53.Record(
"myCname",
{
name: "foo",
records: [{variable referring to other stack,i.e. c}],
ttl: 1800,
type: "CNAME",
zoneId: "Z1MS401EDN11234",
}
);
This way it’s defined in both. If you look at the Route53, you’ll see all DNS records (which is convenient) and see it relates to the CF stack…if you are just looking at the CF project, you’ll see the specific dns, i.e. foo.example.com that the CF distribution points to. Does that sound like a reasonable approach?