-
Notifications
You must be signed in to change notification settings - Fork 1
/
helm_release-ingress-nginx.tf
47 lines (38 loc) · 1.05 KB
/
helm_release-ingress-nginx.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
resource "civo_reserved_ip" "ingress-nginx" {
name = "coder-ingress-nginx"
}
resource "civo_firewall" "ingress-nginx" {
name = "coder-ingress-nginx"
network_id = civo_network.network.id
create_default_rules = false
ingress_rule {
protocol = "tcp"
port_range = "80"
cidr = ["0.0.0.0/0"]
label = "web"
action = "allow"
}
ingress_rule {
protocol = "tcp"
port_range = "443"
cidr = var.lb_access
label = "websecure"
action = "allow"
}
}
resource "helm_release" "ingress-nginx" {
name = "ingress-nginx"
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
namespace = "ingress-nginx"
create_namespace = true
set {
name = "controller.service.annotations.kubernetes\\.civo\\.com/ipv4-address"
value = civo_reserved_ip.ingress-nginx.ip
}
set {
name = "controller.service.annotations.kubernetes\\.civo\\.com/firewall-id"
value = civo_firewall.ingress-nginx.id
}
depends_on = []
}