This message was deleted.
# typescript
s
This message was deleted.
āœ… 1
w
My gut feeling is that when creating the `route53.Record`the
orgCertificate.domain.ValidationOptions[i].resoruceRecordName
is undefined. So, using
apply()
to reconcile the promise should fix that. Try changing the
name
property setting to the following:
Copy code
name: orgCertificate.domainValidationOptions[i].resourceRecordName.apply(resourceRecordName => resourceRecordName)
More discussion of these concepts can be found here: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/# And here: https://www.leebriggs.co.uk/blog/2021/05/09/pulumi-apply.html
a
Hi @witty-candle-66007 I tried the following:
Copy code
name: orgCertificate.domainValidationOptions.apply(domainValidationOptions => domainValidationOptions)[i].resourceRecordName

 error: Running program '/Users/mallison/workspace/gdsgroup/immersify' failed with an unhandled exception:
    Error: Missing required property 'name'
        at new Record (/Users/mallison/workspace/gdsgroup/immersify/node_modules/@pulumi/route53/record.ts:246:23)
Your suggestion:
Copy code
name: orgCertificate.domainValidationOptions[i].resourceRecordName.apply(resourceRecordName => resourceRecordName)

error: Running program '/Users/mallison/workspace/gdsgroup/immersify' failed with an unhandled exception:
    TypeError: Cannot read property 'apply' of undefined
And finally:
Copy code
name: orgCertificate.domainValidationOptions.apply(domainValidationOptions => domainValidationOptions[i].resourceRecordName)
Which worked šŸ‘ Thanks for your help on this
w
I’m glad you were able to work past my incorrect example. šŸ™‚