From 7a594ef427e69c2257afa69433842528ab35ccbd Mon Sep 17 00:00:00 2001 From: Buckingham Date: Thu, 19 Dec 2024 08:58:26 +0000 Subject: [PATCH] Update_191224_2 --- terraform/environments/ppud/iam.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terraform/environments/ppud/iam.tf b/terraform/environments/ppud/iam.tf index f243ff2e2b2..f56265696d6 100644 --- a/terraform/environments/ppud/iam.tf +++ b/terraform/environments/ppud/iam.tf @@ -1491,4 +1491,10 @@ resource "aws_iam_policy_attachment" "attach_lambda_securityhub_readonly_prod" { name = "lambda-securityhub-readonly-iam-attachment" roles = [aws_iam_role.lambda_role_securityhub_get_data_prod[0].id] policy_arn = "arn:aws:iam::aws:policy/AWSSecurityHubReadOnlyAccess" +} + +resource "aws_iam_role_policy_attachment" "lambda_vpc_access_policy_to_lambda_role_securityhub_get_data_prod" { + count = local.is-production == true ? 1 : 0 + role = aws_iam_role.lambda_role_securityhub_get_data_prod[0].id + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" } \ No newline at end of file