This message was deleted.
# general
s
This message was deleted.
l
It shouldn't be painful. The records parameter of an
aws.route53.Record
is of type
pulumi.Input<pulumi.Input<string>[]>
, so you can put the Output<string> directly into the array.
l
The problem is that Crosswalk exports
url
for API Gateway which includes the protocol and path, etc. A DNS record will just want the hostname, so I need to do string operations to get that out of there.
l
You can use something like this:
Copy code
new aws.route53.Route(name, {
  records: [ url.apply((url) => getFqdnFromUri(url)) ]
}
You'll need to write the function yourself. I'm slightly surprised that Route53 doesn't have better integration with apigateway. The alb package targets lambdas, instances etc. very nicely. Maybe they expect ALBs to sit between route53 and apigateways...
l
Gotcha yeah, a colleague was able to write a couple of functions to make it work. It only seems to tightly integrate if you go the Edge Optimized API Gateway route which includes a CloudFront distro, and CloudFront distros DO export the hostname directly for use.
Thanks!
👍 1