Aws policy attachment

Hi, I cannot differentiate between aws_iam_user_policy_attachment and aws_iam_policy_attachment, and I have tried to use aws_iam_policy_attachment, but I was not able to use it. There was an error in ```
resource “aws_iam_policy_attachment” “test-attach” {
name = “test-attachment”
users = []
roles = []
groups = []
policy_arn = aws_iam_policy.policy.arn


Attaches a Managed IAM Policy to an IAM user


Attaches a Managed IAM Policy to user(s), role(s), and/or group(s)

I think the difference is clear, the 1st one can only used with user.


1 Like

Thanks a lot, Trung!

1 Like