any idea how I could get values under `aws.acm.Cer...
# general
b
any idea how I could get values under
aws.acm.Certificate.domainValidationOptions
with the aws provider? The below does not work.
Copy code
// create wildcard certificate
  let awsCertificate = await new aws.acm.Certificate("XXXXXXX", {
    domainName: `*.rpc.${environment.dns}`,
    validationMethod: 'DNS'
  })

  let certVerificationRecord = new aws.route53.Record("XXXXXXX", {
    name: awsCertificate.domainValidationOptions.resourceRecordName,
    records: [awsCertificate.domainValidationOptions.resourceRecordValue],
    type: "TXT",
    zoneId: hostedZone.id,
    ttl: 300
  });
s
Looking at the types involved, I don’t see offhand why that shouldn’t work - how does it fail?
b
all of the values come out as
null
`awsCertificate.domainValidationOptions.resourceRecordName`: null `awsCertificate.domainValidationOptions.resourceRecordValue`: null
s
This is unlikely to be related, but is there a reason you’re awaiting the constructor of the certificate?
b
to get the value for the verification dns record
I was able to get it with
awsCertificate.domainValidationOptions.apply
s
Yeah, you shouldn’t need the await there - the constructors aren’t async - you’re better off allowing the data flow to do its thing there I think
I’ll put together a working example in a second, but to me it looks like it should be ok without the await
b
Yeah I guess await isn’t needed. the
.apply
is still needed though.
s
Yes, the apply may be needed right now. I think we could likely project something better there to remove the need for it