From 15afc6385d974929e468e7b5173294faf3a1b3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Gonz=C3=A1lez?= Date: Sat, 6 Apr 2024 11:43:18 -0600 Subject: [PATCH] aws_iam_role_policy_attachment --- infra/modules/iam/main.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/infra/modules/iam/main.tf b/infra/modules/iam/main.tf index 3414491..a538abd 100644 --- a/infra/modules/iam/main.tf +++ b/infra/modules/iam/main.tf @@ -42,8 +42,7 @@ resource "aws_iam_policy" "lambda_invoke_policy" { }) } -resource "aws_iam_policy_attachment" "lambda_invoke_policy_attachment" { - name = "lambda_invoke_policy_attachment" - roles = [aws_iam_role.lambda_role.name] +resource "aws_iam_role_policy_attachment" "lambda_invoke_policy_attachment" { + role = aws_iam_role.lambda_role.name policy_arn = aws_iam_policy.lambda_invoke_policy.arn }