File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ resource "aws_security_group_rule" "cluster_egress_internet" {
80
80
}
81
81
82
82
resource "aws_security_group_rule" "cluster_https_worker_ingress" {
83
- count = var. cluster_create_security_group && var. create_eks ? 1 : 0
83
+ count = var. cluster_create_security_group && var. create_eks && var . worker_create_security_group ? 1 : 0
84
84
description = " Allow pods to communicate with the EKS cluster API."
85
85
protocol = " tcp"
86
86
security_group_id = local. cluster_security_group_id
Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ resource "aws_launch_template" "workers" {
52
52
network_interfaces {
53
53
associate_public_ip_address = lookup (each. value , " public_ip" , null )
54
54
delete_on_termination = lookup (each. value , " eni_delete" , null )
55
- security_groups = flatten ([
55
+ security_groups = compact ( flatten ([
56
56
var . worker_security_group_id ,
57
57
var . worker_additional_security_group_ids ,
58
58
lookup (
59
59
each. value ,
60
60
" additional_security_group_ids" ,
61
61
null ,
62
62
),
63
- ])
63
+ ]))
64
64
}
65
65
66
66
# if you want to use a custom AMI
You can’t perform that action at this time.
0 commit comments