-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.tf
42 lines (35 loc) · 1.25 KB
/
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
resource "helm_release" "nginx" {
for_each = var.nginx_controllers
name = each.value.name
chart = "ingress-nginx"
namespace = each.value.namespace
version = each.value.version
create_namespace = true
lint = false
wait = false
cleanup_on_fail = true
repository = "https://kubernetes.github.io/ingress-nginx"
dynamic "set" {
for_each = each.value.set_values
content {
name = set.key
value = set.value
}
}
set {
name = "controller.service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-backend-protocol"
value = var.lb_backend_protocol
}
set {
name = "controller.service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-ssl-ports"
value = var.lb_ssl_ports
}
set {
name = "controller.service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-connection-idle-timeout"
value = var.lb_connection_idle_timeout
}
set {
name = "controller.service.annotations.service\\.beta\\.kubernetes\\.io/aws-load-balancer-additional-resource-tags"
value = replace(replace(replace(replace(replace(jsonencode(var.tags), "\"", ""), ":", "="), "{", ""), "}", ""), ",", "\\,")
}
}