Skip to content

Commit

Permalink
Fixing the issue with the dynamo stack
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeCarillo committed Mar 22, 2024
1 parent 106085e commit ad5da82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion iac/lib/dynamo_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DynamoStack extends Construct {
removalPolicy: cdk.RemovalPolicy.DESTROY,
});

new CfnOutput(this, "CoilProjectTable", {
new CfnOutput(this, "ProjectTableName", {
value: this.project_table.tableName,
});
}
Expand Down
12 changes: 6 additions & 6 deletions iac/lib/iac_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ export class IacStack extends cdk.Stack {
}
});

const dynamodb_stack = new DynamoStack(this);
// const dynamodb_stack = new DynamoStack(this);

const ENVIROMMENT_VARIABLES: {[key: string]: string} = {
"DOMAIN": process.env.DOMAIN || "",
"STAGE": process.env.STAGE || "test",
"AZURE_URL": process.env.AZURE_URL || "",
"SECRET_KEY": process.env.SECRET_KEY || "",
"DATABASE_URL": process.env.DATABASE_URL || "",
"PROJECT_TABLE": dynamodb_stack.project_table.tableName,
"DYNAMO_URL": dynamodb_stack.project_table.tableArn,
// "PROJECT_TABLE": dynamodb_stack.project_table.tableName,
// "DYNAMO_URL": dynamodb_stack.project_table.tableArn,
};

const lambda_stack = new LambdaStack(
Expand All @@ -47,8 +47,8 @@ export class IacStack extends cdk.Stack {
coil_resource
);

for (let function_lambda of lambda_stack.functions_need_dynamodb_access) {
dynamodb_stack.project_table.grantReadWriteData(function_lambda);
}
// for (let function_lambda of lambda_stack.functions_need_dynamodb_access) {
// dynamodb_stack.project_table.grantReadWriteData(function_lambda);
// }
}
}

0 comments on commit ad5da82

Please sign in to comment.