From 1038c125fe24e81b286d6d0e472bd416b821b3cd Mon Sep 17 00:00:00 2001 From: Gowri Date: Wed, 8 May 2024 09:30:45 +0930 Subject: [PATCH 1/2] chore: add props to top level construct and fix serviceName being not used --- packages/graphql-mesh-server/lib/fargate.ts | 1 + .../lib/graphql-mesh-server.ts | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/packages/graphql-mesh-server/lib/fargate.ts b/packages/graphql-mesh-server/lib/fargate.ts index 9942673b..54fb0e09 100644 --- a/packages/graphql-mesh-server/lib/fargate.ts +++ b/packages/graphql-mesh-server/lib/fargate.ts @@ -285,6 +285,7 @@ export class MeshService extends Construct { const fargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, `fargate`, { cluster, + serviceName: props.serviceName !== undefined ? props.serviceName : undefined, certificate, enableExecuteCommand: true, cpu: props.cpu || 512, // 0.5 vCPU diff --git a/packages/graphql-mesh-server/lib/graphql-mesh-server.ts b/packages/graphql-mesh-server/lib/graphql-mesh-server.ts index 42cb94dd..b73572c8 100644 --- a/packages/graphql-mesh-server/lib/graphql-mesh-server.ts +++ b/packages/graphql-mesh-server/lib/graphql-mesh-server.ts @@ -178,6 +178,34 @@ export type MeshHostingProps = { * @default authentication-table */ authenticationTable?: string; + + /** + * Specify a name for the ECS cluster + * + * @default - AWS generated cluster name + */ + clusterName?: string; + + /** + * Specify a name for the GraphQL service + * + * @default - AWS generated service name + */ + serviceName?: string; + + /** + * Specify a name for the ECR repository + * + * @default - AWS generated repository name + */ + repositoryName?: string; + + /** + * Specify a name for the task definition family + * + * @default - AWS generated task definition family name + */ + taskDefinitionFamilyName?: string; }; export class MeshHosting extends Construct { From ae5dfa87b59e88d3968a9d56e3014c90154540f9 Mon Sep 17 00:00:00 2001 From: Gowri Date: Wed, 8 May 2024 09:34:20 +0930 Subject: [PATCH 2/2] :green_heart: fix: ci lint --- packages/graphql-mesh-server/lib/fargate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/graphql-mesh-server/lib/fargate.ts b/packages/graphql-mesh-server/lib/fargate.ts index 54fb0e09..d80af465 100644 --- a/packages/graphql-mesh-server/lib/fargate.ts +++ b/packages/graphql-mesh-server/lib/fargate.ts @@ -285,7 +285,8 @@ export class MeshService extends Construct { const fargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, `fargate`, { cluster, - serviceName: props.serviceName !== undefined ? props.serviceName : undefined, + serviceName: + props.serviceName !== undefined ? props.serviceName : undefined, certificate, enableExecuteCommand: true, cpu: props.cpu || 512, // 0.5 vCPU