how to attach multiple IAM policies to an IAM role

892 views
Skip to first unread message

Deepak Prasad

unread,
Jun 8, 2017, 8:53:30 AM6/8/17
to Terraform
Hi All,

I want to attach more than one IAM policy to a role. Both "policy" and "policy_arn" for aws_iam_role_policy or aws_iam_policy_attachment are taking single value. I am wondering how do i pass multiple IAM policies to them?

Thanks,
Deepak

Andrew Langhorn

unread,
Jun 8, 2017, 10:48:32 AM6/8/17
to Terraform
It might not be the most elegant thing to do, but have you tried using the aws_iam_policy_attachment resource multiple times, one for each policy you're trying to attach to the role?
Reply all
Reply to author
Forward
0 new messages