https://pulumi.com logo
#general
Title
# general
b

busy-umbrella-36067

01/22/2019, 12:15 AM
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

stocky-spoon-28903

01/22/2019, 12:18 AM
Looking at the types involved, I don’t see offhand why that shouldn’t work - how does it fail?
b

busy-umbrella-36067

01/22/2019, 12:20 AM
all of the values come out as
null
`awsCertificate.domainValidationOptions.resourceRecordName`: null `awsCertificate.domainValidationOptions.resourceRecordValue`: null
s

stocky-spoon-28903

01/22/2019, 12:26 AM
This is unlikely to be related, but is there a reason you’re awaiting the constructor of the certificate?
b

busy-umbrella-36067

01/22/2019, 12:27 AM
to get the value for the verification dns record
I was able to get it with
awsCertificate.domainValidationOptions.apply
s

stocky-spoon-28903

01/22/2019, 12:28 AM
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

busy-umbrella-36067

01/22/2019, 12:31 AM
Yeah I guess await isn’t needed. the
.apply
is still needed though.
s

stocky-spoon-28903

01/22/2019, 12:32 AM
Yes, the apply may be needed right now. I think we could likely project something better there to remove the need for it
4 Views