diff --git a/terraform/environments/delius-core/modules/components/oracle_db_shared/secrets.tf b/terraform/environments/delius-core/modules/components/oracle_db_shared/secrets.tf index e546442d8d7..0f3c8087c7d 100644 --- a/terraform/environments/delius-core/modules/components/oracle_db_shared/secrets.tf +++ b/terraform/environments/delius-core/modules/components/oracle_db_shared/secrets.tf @@ -48,4 +48,10 @@ data "aws_iam_policy_document" "delius_core_application_passwords" { actions = ["secretsmanager:GetSecretValue"] resources = [aws_secretsmanager_secret.delius_core_application_passwords.arn] } +} + +resource "aws_secretsmanager_secret_policy" "delius_core_application_passwords" { + count = local.has_mis_environment && var.account_info.application_name == "delius-core" ? 1 : 0 + secret_arn = aws_secretsmanager_secret.delius_core_application_passwords.arn + policy = data.aws_iam_policy_document.delius_core_application_passwords[count.index].json } \ No newline at end of file