File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed
Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,9 @@ resource "aws_iam_role_policy" "dynamo_s3_access_policy" {
2222 Statement = [
2323 {
2424 Effect = " Allow" ,
25- Action = var.environment == " prod" ? [
26- " dynamodb:GetItem" ,
27- " dynamodb:Query"
28- ] : [
25+ Action = [
2926 " dynamodb:BatchGetItem" ,
3027 " dynamodb:GetItem" ,
31- " dynamodb:PutItem" ,
32- " dynamodb:UpdateItem" ,
3328 " dynamodb:Query"
3429 ],
3530 Resource = [
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ locals {
1010 # Calculate SHA for both directories
1111 shared_dir_sha = sha1 (join (" " , [for f in local . shared_files : filesha1 (" ${ local . shared_dir } /${ f } " )]))
1212 id_sync_lambda_dir_sha = sha1 (join (" " , [for f in local . id_sync_lambda_files : filesha1 (" ${ local . id_sync_lambda_dir } /${ f } " )]))
13- id_sync_lambda_name = " ${ local . short_prefix } -id_sync_lambda"
13+ id_sync_lambda_name = " ${ local . short_prefix } -id_sync_lambda"
1414}
1515
1616resource "aws_ecr_repository" "id_sync_lambda_repository" {
@@ -225,14 +225,14 @@ resource "aws_iam_policy" "id_sync_lambda_kms_access_policy" {
225225 data.aws_kms_key.existing_s3_encryption_key.arn,
226226 ]
227227 },
228- {
229- Effect = " Allow"
230- Action = [
231- " kms:Decrypt" ,
232- " kms:GenerateDataKey*"
233- ]
234- Resource = data.aws_kms_key.existing_dynamo_encryption_key.arn
235- }
228+ {
229+ Effect = " Allow"
230+ Action = [
231+ " kms:Decrypt" ,
232+ " kms:GenerateDataKey*"
233+ ]
234+ Resource = data.aws_kms_key.existing_dynamo_encryption_key.arn
235+ }
236236 ]
237237 })
238238}
Original file line number Diff line number Diff line change 11resource "aws_sqs_queue" "id_sync_queue" {
2- name = " ${ local . short_prefix } -id-sync-queue"
3- kms_master_key_id = data. aws_kms_key . existing_id_sync_sqs_encryption_key . arn
4- visibility_timeout_seconds = 360
2+ name = " ${ local . short_prefix } -id-sync-queue"
3+ kms_master_key_id = data. aws_kms_key . existing_id_sync_sqs_encryption_key . arn
4+ visibility_timeout_seconds = 360
55 redrive_policy = jsonencode ({
66 deadLetterTargetArn = aws_sqs_queue.id_sync_dlq.arn
77 maxReceiveCount = 4
You can’t perform that action at this time.
0 commit comments