This repository has been archived on 2022-02-19. You can view files and clone it, but cannot push or open issues or pull requests.
infra-aws-eks/eks/security.tf

20 lines
652 B
Terraform
Raw Permalink Normal View History

2022-02-11 15:09:36 +01:00
# Basic rules to allow reaching sshd & service ports (31234)
2022-02-11 14:42:37 +01:00
resource "aws_security_group_rule" "public_in_ssh" {
type = "ingress"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_eks_cluster.eks_cluster.vpc_config[0].cluster_security_group_id
}
resource "aws_security_group_rule" "public_in_http" {
type = "ingress"
from_port = 31234
to_port = 31234
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_eks_cluster.eks_cluster.vpc_config[0].cluster_security_group_id
}