Skip to content

Commit

Permalink
Merge pull request #1393 from aligent/hotfix/Allow-Multiple-Stacks
Browse files Browse the repository at this point in the history
Hotfix: Allow multiple stacks
  • Loading branch information
AdamJHall authored Jul 16, 2024
2 parents 234c0bf + 92262b5 commit 317c7e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/graphql-mesh-server/lib/fargate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ export interface MeshServiceProps {
*/
logStreamPrefix?: string;
/**
* Whether a DynamoDB table should be created to store session data
* @default authentication-table
* Whether a DynamoDB table should be created to store session data,
* if not defined a table will not be created.
* @default undefined
*/
authenticationTable?: string;

Expand Down Expand Up @@ -348,7 +349,7 @@ export class MeshService extends Construct {
managedPolicyArn: "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess",
});

if (props.authenticationTable || props.authenticationTable === undefined) {
if (props.authenticationTable) {
const authTable = new dynamodb.Table(this, "authenticationTable", {
tableName: props.authenticationTable || "authentication-table",
partitionKey: {
Expand Down
7 changes: 7 additions & 0 deletions packages/graphql-mesh-server/lib/graphql-mesh-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ export type MeshHostingProps = {
* @default - AWS generated task definition family name
*/
taskDefinitionFamilyName?: string;

/**
* Specify a name for the dashboard
*
* @default - AWS Generated name
*/
dashboardName?: string;
};

export class MeshHosting extends Construct {
Expand Down
3 changes: 2 additions & 1 deletion packages/graphql-mesh-server/lib/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface PerformanceMetricsProps {
logGroup: LogGroup;
snsTopic?: Topic;
additionalAlarms?: Alarm[];
dashboardName?: string;
}

export class PerformanceMetrics extends Construct {
Expand Down Expand Up @@ -355,7 +356,7 @@ export class PerformanceMetrics extends Construct {

// Create the dashboard
new Dashboard(this, "dashboard", {
dashboardName: "Mesh-Dashboard",
dashboardName: props.dashboardName,
widgets: [
[new Column(...loadBalancerWidgets), new Column(...wafWidgets)],
[meshPerformanceLabel],
Expand Down

0 comments on commit 317c7e0

Please sign in to comment.