This message was deleted.
# general
s
This message was deleted.
w
Here's code I've used for this same purpose for an internal service:
Copy code
// Get certificate for desired endpoint
const certificate = new aws.acm.Certificate(name, {
    domainName: domainName,
    validationMethod: "DNS",
}, { provider: awsEastProvider });
const hostedZoneId = aws.route53.getZone({
    name: hostedZone,
}, { provider: awsProvider }).then(zone => zone.id);
const certificateValidationRecord = new aws.route53.Record(`${name}-validation`, {
    name: certificate.domainValidationOptions.apply(opt => opt[0].resourceRecordName),
    type: certificate.domainValidationOptions.apply(opt => opt[0].resourceRecordType),
    zoneId: hostedZoneId,
    records: [certificate.domainValidationOptions.apply(opt => opt[0].resourceRecordValue)],
    ttl: 60,
}, { provider: awsProvider });
const certificateValidation = new aws.acm.CertificateValidation(name, {
    certificateArn: certificate.arn,
    validationRecordFqdns: [certificateValidationRecord.fqdn],
}, { provider: awsEastProvider });
b
cool thanks
have you used the above code recently? I have to run pulumi up twice because the first time throws an error which looks like some kind of timing issue.