File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,16 @@ locals {
3737
3838 launch_template_ami = length (local. configured_ami_image_id ) == 0 ? (local. features_require_ami ? data. aws_ami . selected [0 ]. image_id : " " ) : local. configured_ami_image_id
3939
40- launch_template_vpc_security_group_ids = (
41- local. need_remote_access_sg ?
42- concat (data. aws_eks_cluster . this [0 ]. vpc_config [* ]. cluster_security_group_id , module. security_group . * . id , var. security_groups ) : []
43- )
40+ launch_template_vpc_security_group_ids = distinct (concat (
41+ (
42+ local. need_remote_access_sg ?
43+ concat (data. aws_eks_cluster . this [0 ]. vpc_config [* ]. cluster_security_group_id , module. security_group . * . id ) : []
44+ ),
45+ (
46+ local. add_sgs_to_cluster_default ?
47+ concat (var. security_groups , data. aws_eks_cluster . this [0 ]. vpc_config [* ]. cluster_security_group_id ) : []
48+ )
49+ ))
4450
4551 # launch_template_key = join(":", coalescelist(local.launch_template_vpc_security_group_ids, ["closed"]))
4652}
Original file line number Diff line number Diff line change 99 features_require_launch_template = local. enabled ? length (var. resources_to_tag ) > 0 || local. need_userdata || local. features_require_ami || local. need_imds_settings : false
1010 remote_access_enabled = local. enabled && var. remote_access_enabled
1111 need_remote_access_sg = local. generate_launch_template && local. remote_access_enabled
12- get_cluster_data = local. enabled ? (local. need_cluster_kubernetes_version || local. need_bootstrap || local. need_remote_access_sg ) : false
12+ add_sgs_to_cluster_default = local. enabled && length (var. security_groups ) > 0 ? true : false
13+ get_cluster_data = local. enabled ? (local. need_cluster_kubernetes_version || local. need_bootstrap || local. need_remote_access_sg || local. add_sgs_to_cluster_default ) : false
1314 autoscaler_enabled = var. enable_cluster_autoscaler != null ? var. enable_cluster_autoscaler : var. cluster_autoscaler_enabled == true
1415 #
1516 # Set up tags for autoscaler and other resources
You can’t perform that action at this time.
0 commit comments