mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-17 09:07:20 +01:00
fix: Not to iterate over remote_access object in dynamic block (#1743)
This commit is contained in:
@@ -173,6 +173,10 @@ module "eks" {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
remote_access = {
|
||||||
|
ec2_ssh_key = "my-ssh-key"
|
||||||
|
}
|
||||||
|
|
||||||
update_config = {
|
update_config = {
|
||||||
max_unavailable_percentage = 50 # or set `max_unavailable`
|
max_unavailable_percentage = 50 # or set `max_unavailable`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,10 +295,10 @@ resource "aws_eks_node_group" "this" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dynamic "remote_access" {
|
dynamic "remote_access" {
|
||||||
for_each = var.remote_access
|
for_each = length(var.remote_access) > 0 ? [var.remote_access] : []
|
||||||
content {
|
content {
|
||||||
ec2_ssh_key = lookup(remote_access.value, "ec2_ssh_key", null)
|
ec2_ssh_key = try(remote_access.value.ec2_ssh_key, null)
|
||||||
source_security_group_ids = lookup(remote_access.value, "source_security_group_ids", [])
|
source_security_group_ids = try(remote_access.value.source_security_group_ids, [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user