-
Notifications
You must be signed in to change notification settings - Fork 0
/
sg.tf
60 lines (53 loc) · 1.38 KB
/
sg.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
49
50
51
52
53
54
55
56
57
58
59
60
/* Security groups */
resource "exoscale_security_group" "sg" {
name = "RulePorts"
}
resource "exoscale_security_group_rule" "http8080healthcheck" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 8080
end_port = 8080
}
resource "exoscale_security_group_rule" "http22SSH" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 22
end_port = 22
}
/* Security group for Prometheus & Grafana Stuff*/
resource "exoscale_security_group_rule" "http9090prometheus" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 9090
end_port = 9090
}
resource "exoscale_security_group_rule" "http9100nodeExporter" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 9100
end_port = 9100
}
resource "exoscale_security_group_rule" "http3000grafana" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 3000
end_port = 3000
}
resource "exoscale_security_group_rule" "http8090autoscaler" {
security_group_id = exoscale_security_group.sg.id
type = "INGRESS"
protocol = "tcp"
cidr = "0.0.0.0/0"
start_port = 8090
end_port = 8090
}