Terraform-provider-aws: Support IAM permission boundaries

Created on 12 Jul 2018  ·  9Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS just released IAM permission boundaries, a very cool new feature that allows us to let IAM principals do stuff with IAM without granting them effective admin powers.

Read more here.

New or Affected Resource(s)

  • aws_iam_user
  • aws_iam_role

Potential Terraform Configuration

It would likely just be another optional attribute on each of those resources to specify a managed policy ARN representing the permissions boundary.

References

enhancement serviciam

Most helpful comment

Pull requests submitted:

  • aws_iam_role data source: #5186
  • aws_iam_role resource: #5184
  • aws_iam_user data source: #5187
  • aws_iam_user resource: #5183

All 9 comments

Pull requests submitted:

  • aws_iam_role data source: #5186
  • aws_iam_role resource: #5184
  • aws_iam_user data source: #5187
  • aws_iam_user resource: #5183

Beautiful, thanks!

Looks like all the PRs are merged, and I think will all be in by 1.30. Thanks again for all the work 😄

Indeed! All support will be in version 1.30.0 of the AWS provider, releasing middle of this week. 👍

These have all been released in version 1.30.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

Doesn't seem to support multiple permission boundary policies, any plan to support it?

@nusnewob Can you explain more what you mean? Looks to me like the AWS implementation supports a single policy as the permission boundary, and you can only attach one permission boundary on a role or user.

@lorengordon I think he means writting stuff like this

resource "aws_iam_policy_attachment" "test" {
name = "test"
users = ["${var.profile_username}"]
policy_arn = "${aws_iam_policy.policy.arn}"
boundary_policy_arn = "${aws_iam_policy.policy_boundary.arn}"
}

But yet, we cannot add a boundary_policy_arn field

UPDATE

My bad, we can do this only on creation

resource "aws_iam_user" "lb" {
user = "${aws_iam_user.lb.name}"
permissions_boundary = "${aws_iam_policy.policy.arn}"
}

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings