mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-29 13:41:47 +02:00
feat: Add support for EC2 principal in assume worker role policy for China (#827)
* Add support for EC2 principal in assume worker role policy for China AWS * Remove local partition according to requested change Co-authored-by: Valeri GOLUBEV <vgolubev@kyriba.com>
This commit is contained in:
@@ -4,7 +4,7 @@ data "aws_caller_identity" "current" {
|
||||
locals {
|
||||
auth_launch_template_worker_roles = [
|
||||
for index in range(0, var.create_eks ? local.worker_group_launch_template_count : 0) : {
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(
|
||||
worker_role_arn = "arn:${data.aws_partition.current.partition}: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,
|
||||
@@ -21,7 +21,7 @@ locals {
|
||||
|
||||
auth_worker_roles = [
|
||||
for index in range(0, var.create_eks ? local.worker_group_count : 0) : {
|
||||
worker_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${element(
|
||||
worker_role_arn = "arn:${data.aws_partition.current.partition}: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,
|
||||
|
||||
Reference in New Issue
Block a user