https://pulumi.com logo
h

handsome-truck-95168

12/10/2019, 11:42 PM
Been running into an error that relates to Output values that are used to create additional resources (specifically, creating Route53 domain records to validate an SSL certificate
The code looks something like:
Copy code
const certificate = new aws.acm.Certificate(domain, {
      domainName: domain,
      subjectAlternativeNames: alternateNames,
      validationMethod: "DNS"
    }),
      domainNames: Output<aws.route53.Record[]> = certificate.domainValidationOptions.apply((opts) => 
        opts.map((opt) => new aws.route53.Record(domain, {
          records: [opt.resourceRecordValue],
          ttl: 60,
          type: opt.resourceRecordType,
          zoneId: zone.id,
      })))


    return new aws.acm.CertificateValidation(domain, {
      certificateArn: certificate.arn,
      validationRecordFqdns: domainNames.apply((domains) => domains.map((domain) => domain.fqdn)),
    }, { dependsOn: domainNames })
(
domain
and
zone
are provided as arguments)
Error isn't real helpful (
pulumi up
, happens during preview):
Copy code
TypeError: Cannot read property 'concat' of undefined
        at C:\Users\Justin\Source\asheworks\deploy\node_modules\@pulumi\pulumi\runtime\resource.js:355:29
        at Generator.next (<anonymous>)
        at fulfilled (C:\Users\Justin\Source\asheworks\deploy\node_modules\@pulumi\pulumi\runtime\resource.js:18:58)
Does that make sense to anyone?
r

rhythmic-hair-33677

12/11/2019, 12:08 AM
It looks like you have a Syntax Error right before domainNames
h

handsome-truck-95168

12/11/2019, 12:10 AM
It compiles and runs, that's an artifact of copying/pasting this out of a larger program