Skip to content

Commit 7776e71

Browse files
committed
Remove old resources
1 parent e5060bf commit 7776e71

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

src/api/routes/iam.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
215215
});
216216
const groupMembers = listGroupMembers(entraIdToken, groupId);
217217
const command = new PutItemCommand({
218-
TableName: `${genericConfig.IAMTablePrefix} - grouproles`,
218+
TableName: `${genericConfig.IAMTablePrefix}-grouproles`,
219219
Item: marshall({
220-
groupUuid: groupId,
220+
id: `GROUP#${groupId}`,
221221
roles: request.body.roles,
222222
createdAt: timestamp,
223223
}),
@@ -235,7 +235,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
235235
await fastify.dynamoClient.send(command);
236236
await logPromise;
237237
fastify.nodeCache.set(
238-
`grouproles - ${groupId}`,
238+
`grouproles-${groupId}`,
239239
request.body.roles,
240240
GENERIC_CACHE_SECONDS,
241241
);

terraform/modules/dynamo/main.tf

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -174,35 +174,6 @@ resource "aws_dynamodb_table" "iam_assignments" {
174174
}
175175
}
176176

177-
178-
resource "aws_dynamodb_table" "iam_group_roles" {
179-
billing_mode = "PAY_PER_REQUEST"
180-
name = "${var.ProjectId}-iam-grouproles"
181-
deletion_protection_enabled = false
182-
hash_key = "groupUuid"
183-
point_in_time_recovery {
184-
enabled = true
185-
}
186-
attribute {
187-
name = "groupUuid"
188-
type = "S"
189-
}
190-
}
191-
192-
resource "aws_dynamodb_table" "iam_user_roles" {
193-
billing_mode = "PAY_PER_REQUEST"
194-
name = "${var.ProjectId}-iam-userroles"
195-
deletion_protection_enabled = false
196-
hash_key = "userEmail"
197-
point_in_time_recovery {
198-
enabled = true
199-
}
200-
attribute {
201-
name = "userEmail"
202-
type = "S"
203-
}
204-
}
205-
206177
resource "aws_dynamodb_table" "user_info" {
207178
billing_mode = "PAY_PER_REQUEST"
208179
name = "${var.ProjectId}-user-info"

0 commit comments

Comments
 (0)