This message was deleted.
# general
s
This message was deleted.
c
What about using stack references for this.
l
That, or create that specific DNS record in the CF project.
m
I think if I create the specific DNS in the CF project, then when I run the Route53 project, it would be deleted? So I’m thinking I can may do like this (in pseudo-code) , have the CF project create the DNS and export the CF resource
Copy code
/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
Copy code
//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?