File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff 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+
4471resource "aws_iam_policy" "production_support" {
4572 count = local. is_production ? 1 : 0
4673 name = " ProductionSupport"
You can’t perform that action at this time.
0 commit comments