Allow to set user defined workers role name (#496)

* Allow to set user defined workers role name

* Add changelog entry

* Keep single variable for worker role name
This commit is contained in:
Ivanich
2019-09-12 18:45:04 +03:00
committed by Max Williams
parent 4264a5fe6e
commit a47f464221
4 changed files with 10 additions and 1 deletions

View File

@@ -314,7 +314,8 @@ resource "aws_security_group_rule" "workers_ingress_cluster_https" {
resource "aws_iam_role" "workers" {
count = var.manage_worker_iam_resources ? 1 : 0
name_prefix = aws_eks_cluster.this.name
name_prefix = var.workers_role_name != "" ? null : aws_eks_cluster.this.name
name = var.workers_role_name != "" ? var.workers_role_name : null
assume_role_policy = data.aws_iam_policy_document.workers_assume_role_policy.json
permissions_boundary = var.permissions_boundary
path = var.iam_path