dumpnet-argo/terraform/security_group.tf

56 lines
1 KiB
HCL

resource "aws_security_group" "talos" {
name = "talos-${var.cluster_name}"
description = "Talos cluster security group"
vpc_id = var.vpc_id
ingress {
description = "Talos API"
from_port = 50000
to_port = 50000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "Kubernetes API"
from_port = 6443
to_port = 6443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "HTTP"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "HTTPS"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "Intra-cluster"
from_port = 0
to_port = 0
protocol = "-1"
self = true
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "talos-${var.cluster_name}"
}
}