Skip to content

Commit

Permalink
chore(infra): Update HTTP/HTTPS listener SSL policy (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jul 28, 2022
1 parent dc566cc commit f958274
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infrastructure/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export = async () => {
// Forward HTTP to HTTPS
const metabaseListenerHttp = targetMetabase.createListener("metabase-http", {
protocol: "HTTP",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
defaultAction: {
type: "redirect",
redirect: {
Expand All @@ -124,6 +125,7 @@ export = async () => {
"metabase-https",
{
protocol: "HTTPS",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
certificateArn: certificates.requireOutput("certificateArn"),
}
);
Expand Down Expand Up @@ -190,6 +192,7 @@ export = async () => {
// Forward HTTP to HTTPS
const hasuraListenerHttp = targetHasura.createListener("hasura-http", {
protocol: "HTTP",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
defaultAction: {
type: "redirect",
redirect: {
Expand All @@ -203,6 +206,7 @@ export = async () => {
const HASURA_DOMAINS = `http://*.${DOMAIN}, https://*.${DOMAIN}, https://${DOMAIN}`;
const hasuraListenerHttps = targetHasura.createListener("hasura-https", {
protocol: "HTTPS",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
certificateArn: certificates.requireOutput("certificateArn"),
});
const hasuraService = new awsx.ecs.FargateService("hasura", {
Expand Down Expand Up @@ -318,6 +322,7 @@ export = async () => {
// Forward HTTP to HTTPS
const apiListenerHttp = targetApi.createListener("api-http", {
protocol: "HTTP",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
defaultAction: {
type: "redirect",
redirect: {
Expand All @@ -329,6 +334,7 @@ export = async () => {
});
const apiListenerHttps = targetApi.createListener("api-https", {
protocol: "HTTPS",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
certificateArn: certificates.requireOutput("certificateArn"),
});
const apiService = new awsx.ecs.FargateService("api", {
Expand Down Expand Up @@ -459,6 +465,7 @@ export = async () => {
// Forward HTTP to HTTPS
const sharedbListenerHttp = targetSharedb.createListener("sharedb-http", {
protocol: "HTTP",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
defaultAction: {
type: "redirect",
redirect: {
Expand All @@ -470,6 +477,7 @@ export = async () => {
});
const sharedbListenerHttps = targetSharedb.createListener("sharedb-https", {
protocol: "HTTPS",
sslPolicy: "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
certificateArn: certificates.requireOutput("certificateArn"),
});
const sharedbService = new awsx.ecs.FargateService("sharedb", {
Expand Down

0 comments on commit f958274

Please sign in to comment.