Skip to content

Commit 5696d65

Browse files
committed
Readonly policy only on persistent environments
1 parent 0e8743d commit 5696d65

File tree

2 files changed

+1027
-0
lines changed

2 files changed

+1027
-0
lines changed

infrastructure/policies.tf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,26 @@ resource "aws_iam_policy" "ssm_access_policy" {
1717
]
1818
})
1919
}
20+
21+
resource "aws_iam_policy" "read_only_role_extra_permissions" {
22+
count = local.is_sandbox ? 0 : 1
23+
name = "ReadOnlyExtraAccess"
24+
policy = jsonencode({
25+
Version = "2012-10-17",
26+
Statement = [
27+
{
28+
Effect = "Allow",
29+
Action = [
30+
"kms:Decrypt",
31+
],
32+
Resource = [
33+
"arn:aws:lambda:eu-west-2:${data.aws_caller_identity.current.account_id}:function:*",
34+
]
35+
}
36+
]
37+
})
38+
tags = {
39+
Name = "ReadOnlyExtraAccess"
40+
Workspace = "core"
41+
}
42+
}

0 commit comments

Comments
 (0)