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.
aws_iam_user
aws_iam_role
It would likely just be another optional attribute on each of those resources to specify a managed policy ARN representing the permissions boundary.
Pull requests submitted:
aws_iam_role
data source: #5186aws_iam_role
resource: #5184 aws_iam_user
data source: #5187aws_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!
Most helpful comment
Pull requests submitted:
aws_iam_role
data source: #5186aws_iam_role
resource: #5184aws_iam_user
data source: #5187aws_iam_user
resource: #5183