Skip to content

Commit 23a596a

Browse files
authored
Merge branch 'main' into PRM-562
2 parents fbbcf99 + 050125b commit 23a596a

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

infrastructure/lambda-dynamodb-migration.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module "migration-dynamodb-lambda" {
2828

2929
lambda_timeout = 900
3030
memory_size = 1024
31-
reserved_concurrent_executions = 200
31+
reserved_concurrent_executions = contains(["prod"], terraform.workspace) ? 100 : 5
3232

3333
depends_on = [
3434
module.lloyd_george_reference_dynamodb_table,

infrastructure/policies.tf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,33 @@ resource "aws_iam_policy" "read_only_role_extra_permissions" {
4141
}
4242
}
4343

44+
resource "aws_iam_policy" "administrator_permission_restrictions" {
45+
count = local.is_sandbox ? 0 : 1
46+
name = "AdministratorRestriction"
47+
policy = jsonencode({
48+
Version = "2012-10-17",
49+
Statement = [
50+
{
51+
Effect = "Deny",
52+
Action = [
53+
"s3:DeleteObject",
54+
"s3:DeleteObjectVersion",
55+
"s3:PutLifecycleConfiguration",
56+
"s3:PutObject",
57+
"s3:RestoreObject"
58+
],
59+
Resource = [
60+
"arn:aws:s3:::*/*.tfstate"
61+
]
62+
}
63+
]
64+
})
65+
tags = {
66+
Name = "AdministratorRestriction"
67+
Workspace = "core"
68+
}
69+
}
70+
4471
resource "aws_iam_policy" "production_support" {
4572
count = local.is_production ? 1 : 0
4673
name = "ProductionSupport"

0 commit comments

Comments
 (0)