Skip to content

Commit 12f94d7

Browse files
index rename and permissions
1 parent 1ab3c7f commit 12f94d7

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

infrastructure/terraform/components/api/ddb_table_supplier_configuration.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "aws_dynamodb_table" "supplier-configuration" {
3838
}
3939

4040
global_secondary_index {
41-
name = "volumeGroupIndex"
41+
name = "volumeGroup-index"
4242
hash_key = "PK"
4343
range_key = "volumeGroup"
4444
projection_type = "ALL"

infrastructure/terraform/components/api/module_lambda_supplier_allocator.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ data "aws_iam_policy_document" "supplier_allocator_lambda" {
9393
]
9494

9595
resources = [
96-
aws_dynamodb_table.supplier-configuration.arn
96+
aws_dynamodb_table.supplier-configuration.arn,
97+
"${aws_dynamodb_table.supplier-configuration.arn}/index/volumeGroup-index"
98+
9799
]
98100
}
99101
}

internal/datastore/src/supplier-config-repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class SupplierConfigRepository {
5656
const result = await this.ddbClient.send(
5757
new QueryCommand({
5858
TableName: this.config.supplierConfigTableName,
59-
IndexName: "VolumeGroupIndex",
59+
IndexName: "volumeGroup-index",
6060
KeyConditionExpression: "PK = :pk AND volumeGroup = :groupId",
6161
ExpressionAttributeValues: {
6262
":pk": "SUPPLIER_ALLOCATIONS",

0 commit comments

Comments
 (0)