Skip to content

Commit 738b82c

Browse files
authored
Merge pull request #1 from nitrocode/aws_iam_role_policy_attachment
Aws iam role policy attachment
2 parents ace2bc9 + 65b4f5e commit 738b82c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

iam.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,10 @@ resource "aws_iam_policy" "network" {
129129
policy = data.aws_iam_policy_document.network[0].json
130130
}
131131

132-
resource "aws_iam_policy_attachment" "network" {
132+
resource "aws_iam_role_policy_attachment" "network" {
133133
count = var.vpc_config == null ? 0 : 1
134134

135-
name = "${var.function_name}-network"
136-
roles = [aws_iam_role.lambda.name]
135+
role = aws_iam_role.lambda.name
137136
policy_arn = aws_iam_policy.network[0].arn
138137
}
139138

0 commit comments

Comments
 (0)