Skip to content

Commit

Permalink
update sg
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Aug 17, 2023
1 parent 6418d58 commit 1cf6355
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/full-cluster-tf-upgrade/1.24/securitygroup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
# We absorbe the local 10.x.x.x/x cidr into the 10/8
#
# extra_cluster_sg
# * in any from self
# * in port 443 from census on-prem, and 10/8
# * in port 10250 for kubectl logs from census on-prem, and 10/8

resource "aws_security_group" "additional_eks_cluster_sg" {
name = format("%v%v-cluster", local._prefixes["eks-security-group"], var.cluster_name)
Expand Down Expand Up @@ -137,13 +139,28 @@ resource "aws_security_group" "extra_cluster_sg" {

vpc_id = data.aws_vpc.eks_vpc.id

ingress {
from_port = 0
to_port = 0
protocol = -1
self = true
}

ingress {
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = concat(var.census_private_cidr, ["10.0.0.0/8"])
}

# kubectl logs
ingress {
from_port = 10250
to_port = 10250
protocol = "tcp"
cidr_blocks = concat(var.census_private_cidr, ["10.0.0.0/8"])
}

egress {
from_port = 0
to_port = 0
Expand Down

0 comments on commit 1cf6355

Please sign in to comment.