forked from consort-it/cme2-kubernetes-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsg-dev-k8s.tf
48 lines (43 loc) · 1.74 KB
/
sg-dev-k8s.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
resource "aws_security_group" "ingress-dev-k8s-consort-it-de" {
name = "ingress.dev.k8s.consort-it.de"
vpc_id = "${aws_vpc.dev-k8s-consort-it-de.id}"
description = "ingress.dev.k8s.consort-it.de"
tags = {
KubernetesCluster = "dev.k8s.consort-it.de"
Name = "ingress.dev.k8s.consort-it.de"
"kubernetes.io/cluster/dev.k8s.consort-it.de" = "owned"
"kubernetes:application" = "kube-ingress-aws-controller"
}
}
resource "aws_security_group_rule" "http-external-to-node-0-0-0-0--0" {
type = "ingress"
security_group_id = "${aws_security_group.ingress-dev-k8s-consort-it-de.id}"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
resource "aws_security_group_rule" "https-external-to-node-0-0-0-0--0" {
type = "ingress"
security_group_id = "${aws_security_group.ingress-dev-k8s-consort-it-de.id}"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
resource "aws_security_group_rule" "all-ingress-to-node" {
type = "ingress"
security_group_id = "${aws_security_group.nodes-dev-k8s-consort-it-de.id}"
source_security_group_id = "${aws_security_group.ingress-dev-k8s-consort-it-de.id}"
from_port = 0
to_port = 0
protocol = "-1"
}
resource "aws_security_group_rule" "all-lb-to-cidr" {
type = "egress"
security_group_id = "${aws_security_group.ingress-dev-k8s-consort-it-de.id}"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["172.20.0.0/16"]
}