This message was deleted.
# aws
s
This message was deleted.
f
It’ll look something like this:
Copy code
// Setup a certificate and attach it to the listener.
const certificate = new aws.acm.Certificate("certificate", {
    domainName: "<http://example.com|example.com>",
    validationMethod: "DNS",
});

const zone = pulumi.output(aws.route53.getZone({
    name: "<http://example.com|example.com>",
    privateZone: false,
}));

const validationRecord = new aws.route53.Record(`cert-validation-record`, {
    allowOverwrite: true,
    name: certificate.domainValidationOptions[0].resourceRecordName,
    records: [certificate.domainValidationOptions[0].resourceRecordValue],
    ttl: 600,
    type: certificate.domainValidationOptions[0].resourceRecordType,
    zoneId: zone.zoneId,
});

const domainVerificationRecord = new aws.acm.CertificateValidation("cert-validation", {
    certificateArn: certificate.arn,
    validationRecordFqdns: [ validationRecord.fqdn ],
});

const serviceTargetGroup = new awsx.lb.ApplicationTargetGroup("service-tg", {
    vpc,
    loadBalancer: alb,
    port: 8000,
});

const serviceListener = serviceTargetGroup.createListener("service-listener", {
    vpc,
    loadBalancer: alb,
    certificateArn: certificate.arn,
    protocol: "HTTPS",
}, { dependsOn: [ domainVerificationRecord ]});
w
Thank you, I'll give it a try!
s
The aws-ts-static-website example might be a helpful reference too