forked from terraform-iaac/terraform-helm-nginx-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
76 lines (70 loc) · 1.78 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
resource "helm_release" "application" {
name = var.name
chart = local.helm_chart
namespace = var.namespace
repository = local.helm_repository
version = var.chart_version
atomic = var.atomic
create_namespace = var.create_namespace
wait = var.wait
timeout = var.timeout
values = [var.disable_heavyweight_metrics ? file("${path.module}/templates/metrics-disable.yaml") : ""]
set {
name = "controller.kind"
value = var.controller_kind
}
set {
name = "controller.ingressClassResource.name"
value = var.ingress_class_name
}
set {
name = "controller.ingressClassResource.default"
value = var.ingress_class_is_default
}
set {
name = "controller.daemonset.useHostPort"
value = var.controller_daemonset_useHostPort
}
set {
name = "controller.service.externalTrafficPolicy"
value = var.controller_service_externalTrafficPolicy
}
set {
name = "controller.publishService.enabled"
value = var.publish_service
}
set {
name = "controller.resources.requests.memory"
type = "string"
value = "${var.controller_request_memory}Mi"
}
dynamic "set" {
for_each = local.controller_service_nodePorts
content {
name = set.value.name
value = set.value.value
}
}
dynamic "set" {
for_each = local.loadBalancerIP
content {
name = set.value.name
value = set.value.value
}
}
dynamic "set" {
for_each = local.metrics_enabled
content {
name = set.value.name
value = set.value.value
}
}
dynamic "set" {
for_each = var.additional_set
content {
name = set.value.name
value = set.value.value
type = lookup(set.value, "type", null)
}
}
}