File tree 2 files changed +7
-3
lines changed
examples/eks_managed_node_group
modules/eks-managed-node-group
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ module "eks" {
173
173
}
174
174
]
175
175
176
+ remote_access = {
177
+ ec2_ssh_key = " my-ssh-key"
178
+ }
179
+
176
180
update_config = {
177
181
max_unavailable_percentage = 50 # or set `max_unavailable`
178
182
}
Original file line number Diff line number Diff line change @@ -295,10 +295,10 @@ resource "aws_eks_node_group" "this" {
295
295
}
296
296
297
297
dynamic "remote_access" {
298
- for_each = var. remote_access
298
+ for_each = length ( var. remote_access ) > 0 ? [ var . remote_access ] : []
299
299
content {
300
- ec2_ssh_key = lookup (remote_access. value , " ec2_ssh_key" , null )
301
- source_security_group_ids = lookup (remote_access. value , " source_security_group_ids" , [])
300
+ ec2_ssh_key = try (remote_access. value . ec2_ssh_key , null )
301
+ source_security_group_ids = try (remote_access. value . source_security_group_ids , [])
302
302
}
303
303
}
304
304
You can’t perform that action at this time.
0 commit comments