Skip to content

Commit 8495843

Browse files
committed
create uin hash dynamodb table
1 parent 46d4313 commit 8495843

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/common/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type GenericConfigType = {
5656
TestingCredentialsSecret: string;
5757
UinHashingSecret: string;
5858
UinExtendedAttributeName: string;
59+
UinHashTable: string;
5960
};
6061

6162
type EnvironmentConfigType = {
@@ -95,7 +96,8 @@ const genericConfig: GenericConfigType = {
9596
ConfigSecretName: "infra-core-api-config",
9697
TestingCredentialsSecret: "infra-core-api-testing-credentials",
9798
UinHashingSecret: "infra-core-api-uin-pepper",
98-
UinExtendedAttributeName: "extension_a70c2e1556954056a6a8edfb1f42f556_uiucEduUIN"
99+
UinExtendedAttributeName: "extension_a70c2e1556954056a6a8edfb1f42f556_uiucEduUIN",
100+
UinHashTable: "infra-core-api-uin-mapping",
99101
} as const;
100102

101103
const environmentConfig: EnvironmentConfigType = {

terraform/modules/dynamo/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,17 @@ resource "aws_dynamodb_table" "cache" {
270270
enabled = true
271271
}
272272
}
273+
274+
resource "aws_dynamodb_table" "app_uin_records" {
275+
billing_mode = "PAY_PER_REQUEST"
276+
name = "${var.ProjectId}-uin-mapping"
277+
deletion_protection_enabled = true
278+
hash_key = "uinHash"
279+
point_in_time_recovery {
280+
enabled = true
281+
}
282+
attribute {
283+
name = "uinHash"
284+
type = "S"
285+
}
286+
}

0 commit comments

Comments
 (0)