-
-
Save voronenko-p/ff26330f78e0ed2cf3d7d6d81923485e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //EKS Master Cluster Security Group | |
| //This security group controls networking access to the Kubernetes masters. | |
| //Needs to be configured also with an ingress rule to allow traffic from the worker nodes. | |
| resource "aws_security_group" "eks-control-plane-sg" { | |
| name = "${local.env}-control-plane" | |
| description = "Cluster communication with worker nodes [${local.env}]" | |
| vpc_id = "${aws_vpc.cluster.id}" | |
| egress { | |
| from_port = 0 | |
| to_port = 0 | |
| protocol = "-1" | |
| cidr_blocks = ["0.0.0.0/0"] | |
| } | |
| } | |
| # OPTIONAL: Allow inbound traffic from your local workstation external IP | |
| # to the Kubernetes. You will need to replace A.B.C.D below with | |
| # your real IP. Services like icanhazip.com can help you find this. | |
| //resource "aws_security_group_rule" "eks-ingress-workstation-https" { | |
| // cidr_blocks = ["A.B.C.D/32"] | |
| // description = "Allow workstation to communicate with the cluster API Server" | |
| // from_port = 443 | |
| // protocol = "tcp" | |
| // security_group_id = "${aws_security_group.eks-control-plane-sg.id}" | |
| // to_port = 443 | |
| // type = "ingress" | |
| //} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment