salmon-ghost-8621105/27/2020, 2:42 PM
when the hosted zone name does not exist. I can't even trap it with a try...catch statement (I'm using typescript). Error messages are like
How do I check if a hosted zone exists?
error: Running program '/home/bbaker/dev/infrastructure/eks/Pulumi' failed with an unhandled exception: Error: invocation of aws:route53/getZone:getZone returned an error: invoking aws:route53/getZone:getZone: no matching Route53Zone found at /home/bbaker/dev/infrastructure/eks/Pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:136:33 at Http2CallStream.<anonymous> (/home/bbaker/dev/infrastructure/eks/Pulumi/node_modules/@grpc/grpc-js/src/client.ts:155:9) at Http2CallStream.emit (events.js:322:22) at Http2CallStream.EventEmitter.emit (domain.js:482:12) at /home/bbaker/dev/infrastructure/eks/Pulumi/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14 at processTicksAndRejections (internal/process/task_queues.js:79:11)
gentle-diamond-7014705/27/2020, 2:55 PM
and lookup functions. We have an issue at https://github.com/pulumi/pulumi/issues/3364 to add support for this. As a workaround, you can use the AWS SDK directly (https://github.com/aws/aws-sdk-js) to query for the Zone and then proceed with any Pulumi resources you need based on that.
salmon-ghost-8621105/27/2020, 2:57 PM