Skip to content
Merged
8 changes: 8 additions & 0 deletions terraform/environments/oasys/locals_preproduction.tf
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,16 @@ locals {
resources = [
"arn:aws:secretsmanager:*:*:secret:/oracle/database/*PP/*",
"arn:aws:secretsmanager:*:*:secret:/oracle/database/PP*/*",
"arn:aws:secretsmanager:*:*:secret:/postgres/database/hmpps-arns-assessment-view-db-preprod/*",
]
},
{
effect = "Allow"
actions = [
"kms:Decrypt",
]
resources = ["*"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be a specific resource to follow the least privilege. If you dont know the key ARN maybe a condition or restrict usage to secrets manager.

},
]
}
Ec2PreprodWebPolicy = {
Expand Down
8 changes: 8 additions & 0 deletions terraform/environments/oasys/locals_production.tf
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,16 @@ locals {
"arn:aws:secretsmanager:*:*:secret:/oracle/database/*PD/*",
"arn:aws:secretsmanager:*:*:secret:/oracle/database/PD*/*",
"arn:aws:secretsmanager:*:*:secret:/oracle/database/DR*/*",
"arn:aws:secretsmanager:*:*:secret:/postgres/database/hmpps-arns-assessment-view-db-prod/*",
]
},
{
effect = "Allow"
actions = [
"kms:Decrypt",
]
resources = ["*"]
},
]
}
Ec2ProdWebPolicy = {
Expand Down
10 changes: 9 additions & 1 deletion terraform/environments/oasys/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,16 @@ locals {
resources = [
"arn:aws:secretsmanager:*:*:secret:/oracle/database/*T2/*",
"arn:aws:secretsmanager:*:*:secret:/oracle/database/T2*/*",
"arn:aws:secretsmanager:*:*:secret:/postgres/database/hmpps-arns-assessment-view-db-test/*",
]
}
},
{
effect = "Allow"
actions = [
"kms:Decrypt",
]
resources = ["*"]
},
]
}
Ec2T2WebPolicy = {
Expand Down
Loading