@@ -55,28 +55,42 @@ module "dynamo" {
5555 source = " ../../modules/dynamo"
5656 ProjectId = var. ProjectId
5757}
58- moved {
59- from = aws_dynamodb_table. app_audit_log
60- to = module. dynamo . aws_dynamodb_table . app_audit_log
61- }
6258
63- moved {
64- from = aws_dynamodb_table . membership_provisioning_log
65- to = module . dynamo . aws_dynamodb_table . membership_provisioning_log
59+ import {
60+ id = " ${ var . ProjectId } -membership-external-v3 "
61+ to = aws_dynamodb_table. external_membership
6662}
63+ resource "aws_dynamodb_table" "external_membership" {
64+ billing_mode = " PAY_PER_REQUEST"
65+ name = " ${ var . ProjectId } -membership-external-v3"
66+ deletion_protection_enabled = true
67+ hash_key = " memberList"
68+ range_key = " netId"
69+ point_in_time_recovery {
70+ enabled = true
71+ }
72+ attribute {
73+ name = " netId"
74+ type = " S"
75+ }
76+
77+ attribute {
78+ name = " memberList"
79+ type = " S"
80+ }
6781
82+ global_secondary_index {
83+ name = " invertedIndex"
84+ hash_key = " netId"
85+ range_key = " memberList"
86+ projection_type = " KEYS_ONLY"
87+ }
6888
69- moved {
70- from = aws_dynamodb_table. api_keys
71- to = module. dynamo . aws_dynamodb_table . api_keys
72- }
7389
74- moved {
75- from = aws_dynamodb_table. room_requests
76- to = module. dynamo . aws_dynamodb_table . room_requests
77- }
90+ global_secondary_index {
91+ name = " keysOnlyIndex"
92+ hash_key = " memberList"
93+ projection_type = " KEYS_ONLY"
94+ }
7895
79- moved {
80- from = aws_dynamodb_table. room_requests_status
81- to = module. dynamo . aws_dynamodb_table . room_requests_status
8296}
0 commit comments