From 21f12157da0927a3f1e758f64096c1d03d434cf5 Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Mon, 14 Jul 2025 13:12:05 -0400 Subject: [PATCH] create ext membership v2 table with IAM permissions --- cloudformation/iam.yml | 1 + cloudformation/main.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/cloudformation/iam.yml b/cloudformation/iam.yml index 9cbb491a..057494bb 100644 --- a/cloudformation/iam.yml +++ b/cloudformation/iam.yml @@ -75,6 +75,7 @@ Resources: - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-provisioning - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-external + - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-external-v2 - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status - Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-linkry diff --git a/cloudformation/main.yml b/cloudformation/main.yml index c7fb4fb0..d9740e0a 100644 --- a/cloudformation/main.yml +++ b/cloudformation/main.yml @@ -415,6 +415,37 @@ Resources: - AttributeName: netid_list KeyType: HASH + ExternalMembershipV2RecordsTable: + Type: "AWS::DynamoDB::Table" + DeletionPolicy: "Retain" + UpdateReplacePolicy: "Retain" + Properties: + BillingMode: "PAY_PER_REQUEST" + TableName: infra-core-api-membership-external-v2 + DeletionProtectionEnabled: true + PointInTimeRecoverySpecification: + PointInTimeRecoveryEnabled: !If [IsProd, true, false] + AttributeDefinitions: + - AttributeName: "netId" + AttributeType: "S" + - AttributeName: "memberList" + AttributeType: "S" + KeySchema: + - AttributeName: "netId" + KeyType: "HASH" + - AttributeName: "memberList" + KeyType: "RANGE" + GlobalSecondaryIndexes: + - IndexName: "invertedIndex" + KeySchema: + - AttributeName: "memberList" + KeyType: "HASH" + - AttributeName: "netId" + KeyType: "RANGE" + Projection: + ProjectionType: "ALL" + + RoomRequestsTable: Type: "AWS::DynamoDB::Table" DeletionPolicy: "Retain"