sparse-intern-71089
08/09/2019, 8:56 PMwhite-balloon-205
// 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 });
billowy-laptop-45963
08/12/2019, 8:16 PMbillowy-laptop-45963
08/13/2019, 8:21 PM