mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-27 20:01:06 +01:00
Support custom IAM roles for cluster and workers (#338)
* allow specifying custom worker IAM instance profiles * allow specifying custom cluster IAM role * add doc * update changelog * use data.aws_iam_instance_profile.name
This commit is contained in:
committed by
Max Williams
parent
613fb1ca96
commit
959e5330e3
@@ -39,7 +39,7 @@ data "template_file" "launch_template_worker_role_arns" {
|
||||
template = "${file("${path.module}/templates/worker-role.tpl")}"
|
||||
|
||||
vars {
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(aws_iam_instance_profile.workers_launch_template.*.role, count.index)}"
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(coalescelist(aws_iam_instance_profile.workers_launch_template.*.role, data.aws_iam_instance_profile.custom_worker_group_launch_template_iam_instance_profile.*.role_name), count.index)}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ data "template_file" "worker_role_arns" {
|
||||
template = "${file("${path.module}/templates/worker-role.tpl")}"
|
||||
|
||||
vars {
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(aws_iam_instance_profile.workers.*.role, count.index)}"
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(coalescelist(aws_iam_instance_profile.workers.*.role, data.aws_iam_instance_profile.custom_worker_group_iam_instance_profile.*.role_name), count.index)}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user