Skip to content

Commit a1a1644

Browse files
dylanhellemsmax-rocket-internet
authored andcommitted
Add optional permissions_boundary (#265)
* Add optional permissions_boundary * Update CHANGELOG
1 parent a23c43c commit a1a1644

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
##### Added
1313

14+
- Ability to specify a permissions_boundary for IAM roles (by @dylanhellems)
1415
- Ability to configure force_delete for the worker group ASG (by @stefansedich)
1516
- Ability to configure worker group ASG tags (by @stefansedich)
1617
- Added EBS optimized mapping for the g3s.xlarge instance type (by @stefansedich)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
130130
| map\_roles\_count | The count of roles in the map_roles list. | string | `"0"` | no |
131131
| map\_users | Additional IAM users to add to the aws-auth configmap. See examples/eks_test_fixture/variables.tf for example format. | list | `[]` | no |
132132
| map\_users\_count | The count of roles in the map_users list. | string | `"0"` | no |
133+
| permissions\_boundary | If provided, all IAM roles will be created with this permissions boundary attached. | string | `""` | no |
133134
| subnets | A list of subnets to place the EKS cluster and workers within. | list | n/a | yes |
134135
| tags | A map of tags to add to all resources. | map | `{}` | no |
135136
| vpc\_id | VPC where the cluster and workers will be deployed. | string | n/a | yes |

cluster.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ resource "aws_security_group_rule" "cluster_https_worker_ingress" {
5252
resource "aws_iam_role" "cluster" {
5353
name_prefix = "${var.cluster_name}"
5454
assume_role_policy = "${data.aws_iam_policy_document.cluster_assume_role_policy.json}"
55+
permissions_boundary = "${var.permissions_boundary}"
5556
force_detach_policies = true
5657
}
5758

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,8 @@ variable "worker_create_security_group" {
216216
description = "Whether to create a security group for the workers or attach the workers to `worker_security_group_id`."
217217
default = true
218218
}
219+
220+
variable "permissions_boundary" {
221+
description = "If provided, all IAM roles will be created with this permissions boundary attached."
222+
default = ""
223+
}

workers.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ resource "aws_security_group_rule" "workers_ingress_cluster_https" {
114114
resource "aws_iam_role" "workers" {
115115
name_prefix = "${aws_eks_cluster.this.name}"
116116
assume_role_policy = "${data.aws_iam_policy_document.workers_assume_role_policy.json}"
117+
permissions_boundary = "${var.permissions_boundary}"
117118
force_detach_policies = true
118119
}
119120

0 commit comments

Comments
 (0)