Skip to content

Instantly share code, notes, and snippets.

@atazangene
Created September 26, 2023 12:02
Show Gist options
  • Save atazangene/03ca0c4cfd532ebc9949e1012dc695a9 to your computer and use it in GitHub Desktop.
Save atazangene/03ca0c4cfd532ebc9949e1012dc695a9 to your computer and use it in GitHub Desktop.
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