diff --git a/terraform/etl/48-lambda-gov-notify-ingestion.tf b/terraform/etl/48-lambda-gov-notify-ingestion.tf index 39f803625..fafc24739 100644 --- a/terraform/etl/48-lambda-gov-notify-ingestion.tf +++ b/terraform/etl/48-lambda-gov-notify-ingestion.tf @@ -104,7 +104,7 @@ data "aws_iam_policy_document" "gov_notify_lambda_secret_access" { "secretsmanager:GetSecretValue", ] effect = "Allow" - resources = ["arn:aws:secretsmanager:eu-west-2:${data.aws_caller_identity.current.account_id}:secret:housing/gov-notify*"] + resources = ["arn:aws:secretsmanager:eu-west-2:${data.aws_caller_identity.data_platform.account_id}:secret:housing/gov-notify*"] } } @@ -118,4 +118,4 @@ resource "aws_iam_role_policy_attachment" "gov_notify_lambda_secret_access" { count = local.is_live_environment && !local.is_production_environment ? 1 : 0 role = aws_iam_role.housing_gov_notify_ingestion[0].name policy_arn = aws_iam_policy.gov_notify_lambda_secret_access[0].arn -} \ No newline at end of file +}