From 5d7154e145e2f16c542130799d432ca2386b39ac Mon Sep 17 00:00:00 2001 From: Adam Hall Date: Fri, 22 Nov 2024 10:13:50 +1030 Subject: [PATCH] Add prop to disable ECS exec --- packages/graphql-mesh-server/lib/fargate.ts | 8 +++++++- packages/graphql-mesh-server/lib/graphql-mesh-server.ts | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/graphql-mesh-server/lib/fargate.ts b/packages/graphql-mesh-server/lib/fargate.ts index d0a05100..9ccae001 100644 --- a/packages/graphql-mesh-server/lib/fargate.ts +++ b/packages/graphql-mesh-server/lib/fargate.ts @@ -232,6 +232,12 @@ export interface MeshServiceProps { * } */ cpuStepScalingOptions?: Partial; + + /** + * Enable ECS Exec on the fargate containers + * @default true + */ + enableEcsExec?: boolean; } export class MeshService extends Construct { @@ -412,7 +418,7 @@ export class MeshService extends Construct { serviceName: props.serviceName !== undefined ? props.serviceName : undefined, certificate, - enableExecuteCommand: true, + enableExecuteCommand: props.enableEcsExec ?? true, cpu: props.cpu || 512, // 0.5 vCPU memoryLimitMiB: props.memory || 1024, // 1 GB taskDefinition: taskDefinition, diff --git a/packages/graphql-mesh-server/lib/graphql-mesh-server.ts b/packages/graphql-mesh-server/lib/graphql-mesh-server.ts index 0205e64a..cd303275 100644 --- a/packages/graphql-mesh-server/lib/graphql-mesh-server.ts +++ b/packages/graphql-mesh-server/lib/graphql-mesh-server.ts @@ -226,6 +226,12 @@ export type MeshHostingProps = { * @default - AWS Generated name */ dashboardName?: string; + + /** + * Enable ECS Exec on the fargate containers + * @default true + */ + enableEcsExec?: boolean; }; export class MeshHosting extends Construct {