mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-24 18:31:09 +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
15
data.tf
15
data.tf
@@ -100,3 +100,18 @@ data "template_file" "launch_template_userdata" {
|
||||
kubelet_extra_args = "${lookup(var.worker_groups_launch_template[count.index], "kubelet_extra_args", local.workers_group_launch_template_defaults["kubelet_extra_args"])}"
|
||||
}
|
||||
}
|
||||
|
||||
data "aws_iam_role" "custom_cluster_iam_role" {
|
||||
name = "${var.cluster_iam_role_name}"
|
||||
count = "${var.manage_cluster_iam_resources ? 0 : 1}"
|
||||
}
|
||||
|
||||
data "aws_iam_instance_profile" "custom_worker_group_iam_instance_profile" {
|
||||
name = "${lookup(var.worker_groups[count.index], "iam_instance_profile_name", local.workers_group_defaults["iam_instance_profile_name"])}"
|
||||
count = "${var.manage_worker_iam_resources ? 0 : var.worker_group_count}"
|
||||
}
|
||||
|
||||
data "aws_iam_instance_profile" "custom_worker_group_launch_template_iam_instance_profile" {
|
||||
name = "${lookup(var.worker_groups_launch_template[count.index], "iam_instance_profile_name", local.workers_group_launch_template_defaults["iam_instance_profile_name"])}"
|
||||
count = "${var.manage_worker_iam_resources ? 0 : var.worker_group_launch_template_count}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user