From 095a97b0e210c46efabb9abbdccc2d17d0d91c6f Mon Sep 17 00:00:00 2001 From: KONFeature Date: Fri, 26 Jul 2024 15:04:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Add=20portocol=20to=20alb=20targ?= =?UTF-8?q?et?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iac/Erpc.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iac/Erpc.ts b/iac/Erpc.ts index 51837a4..69da58c 100644 --- a/iac/Erpc.ts +++ b/iac/Erpc.ts @@ -5,6 +5,7 @@ import { Service, type StackContext, use } from "sst/constructs"; import { ConfigStack } from "./Config"; import { IndexerStack } from "./Indexer"; import { buildSecretsMap } from "./utils"; +import { ApplicationProtocol } from "aws-cdk-lib/aws-elasticloadbalancingv2"; /** * The CDK stack that will deploy the erpc service @@ -112,18 +113,22 @@ export function ErpcStack({ app, stack }: StackContext) { // Add the listener on port 8080 for the rpc const httpListener = alb.addListener("ErpcHttpListener", { port: 8080, + protocol: ApplicationProtocol.HTTP, }); httpListener.addTargets("ErpcHttpTarget", { port: 4000, + protocol: ApplicationProtocol.HTTP, targets: [erpcFargateService], }); // Add the metrics listener const metricsListener = alb.addListener("ErpcMetricsListener", { port: 8081, + protocol: ApplicationProtocol.HTTP, }); metricsListener.addTargets("ErpcHttpTarget", { port: 4001, + protocol: ApplicationProtocol.HTTP, targets: [erpcFargateService], });