File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1- 0.13 .0
1+ 0.14 .0
Original file line number Diff line number Diff line change @@ -7,6 +7,35 @@ locals {
77}
88
99
10+ # ##################################################
11+ # Cluster Security Group Rules
12+ # ##################################################
13+
14+ resource "aws_security_group_rule" "node" {
15+ security_group_id = aws_eks_cluster. this . vpc_config [0 ]. cluster_security_group_id
16+ type = " ingress"
17+ description = " Allow nodes to communicate to the cluster security group(for fargate pods)."
18+
19+ protocol = " -1"
20+ from_port = 0
21+ to_port = 0
22+
23+ source_security_group_id = module. security_group__node . id
24+ }
25+
26+ resource "aws_security_group_rule" "pod" {
27+ security_group_id = aws_eks_cluster. this . vpc_config [0 ]. cluster_security_group_id
28+ type = " ingress"
29+ description = " Allow pods to communicate to the cluster security group(for fargate pods)."
30+
31+ protocol = " -1"
32+ from_port = 0
33+ to_port = 0
34+
35+ source_security_group_id = module. security_group__pod . id
36+ }
37+
38+
1039# ##################################################
1140# Security Group for Control Plane
1241# ##################################################
@@ -231,6 +260,15 @@ module "security_group__pod" {
231260
232261 source_security_group_id = module.security_group__node.id
233262 },
263+ {
264+ id = " all/cluster"
265+ description = " Allow pods to communicate from the cluster security group(for fargate pods)."
266+ protocol = " -1"
267+ from_port = 0
268+ to_port = 0
269+
270+ source_security_group_id = aws_eks_cluster.this.vpc_config[0 ].cluster_security_group_id
271+ },
234272 {
235273 id = " metrics-server/control-plane"
236274 description = " Allow pods to receive metrics-server communication from the cluster control plane."
You can’t perform that action at this time.
0 commit comments