Is it possible to write a custom resource similar ...
# aws
g
Is it possible to write a custom resource similar to
aws.acm.CertificateValidation
? I need a resource that keeps waiting for something to become available. Can I achieve this with a dynamic resource provider or do I need a more real resource and provider? eg. This is an example (I know I could orchestrate things via eventbridge) but my resources are not AWS.
Copy code
const dnsRecord = new aws.route53.Record()
const waiter = new waitForDns(rec: dnsRecord.url)
const example = new aws.lambda.Invocation(, {dependsOn: waiter})
l
Yes. The
create()
method is `async`: just wait in there and don't return until you have the information you need. You'll probably want a loop around a call to
await setTimeout(...)
.
🙌 1