-
-
Save atazangene/03ca0c4cfd532ebc9949e1012dc695a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cloudflareRecord = new cloudflare.Record(`clf-${pulumi.getStack()}`, { | |
name: cert.domainValidationOptions[0].resourceRecordName, | |
value: cert.domainValidationOptions[0].resourceRecordValue, | |
zoneId: process.env.WEBSITE_CLOUDFLARE_ZONE_ID, | |
type: cert.domainValidationOptions[0].resourceRecordType, | |
proxied: false, | |
ttl: 60 | |
}); | |
// now, we need to validate the certificate | |
// sometimes, | |
const certValidation = new aws.acm.CertificateValidation(`cert-val-${pulumi.getStack()}`, { | |
certificateArn: cert.arn, | |
validationRecordFqdns: [cloudflareRecord.hostname], | |
}); | |
// The default port for the fusion auth is 9011, however, | |
// we want to access it through the HTTP port which is 443 | |
const listener = new aws.lb.Listener(`listener-${pulumi.getStack()}`, { | |
loadBalancerArn: loadBalancer.loadBalancer.arn, | |
port: 443, | |
protocol: "HTTPS", | |
certificateArn: cert.arn, | |
defaultActions: [{ | |
type: "forward", | |
targetGroupArn: loadBalancer.defaultTargetGroup.arn, | |
}] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment