forked from terraform-module/terraform-helm-release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
63 lines (57 loc) · 2.66 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
resource "helm_release" "this" {
count = var.app["deploy"] ? 1 : 0
namespace = var.namespace
repository = var.repository
repository_key_file = lookup(var.repository_config, "repository_key_file", null)
repository_cert_file = lookup(var.repository_config, "repository_cert_file", null)
repository_ca_file = lookup(var.repository_config, "repository_ca_file", null)
repository_username = lookup(var.repository_config, "repository_username", null)
repository_password = lookup(var.repository_config, "repository_password", null)
name = var.app["name"]
version = var.app["version"]
chart = var.app["chart"]
force_update = lookup(var.app, "force_update", true)
wait = lookup(var.app, "wait", true)
recreate_pods = lookup(var.app, "recreate_pods", true)
max_history = lookup(var.app, "max_history", 0)
lint = lookup(var.app, "lint", true)
cleanup_on_fail = lookup(var.app, "cleanup_on_fail", false)
create_namespace = lookup(var.app, "create_namespace", false)
disable_webhooks = lookup(var.app, "disable_webhooks", false)
verify = lookup(var.app, "verify", false)
reuse_values = lookup(var.app, "reuse_values", false)
reset_values = lookup(var.app, "reset_values", false)
atomic = lookup(var.app, "atomic", false)
skip_crds = lookup(var.app, "skip_crds", false)
render_subchart_notes = lookup(var.app, "render_subchart_notes", true)
disable_openapi_validation = lookup(var.app, "disable_openapi_validation", false)
wait_for_jobs = lookup(var.app, "wait_for_jobs", false)
dependency_update = lookup(var.app, "dependency_update", false)
replace = lookup(var.app, "replace", false)
timeout = lookup(var.app, "timeout", 300)
values = var.values
dynamic "set" {
iterator = item
for_each = var.set == null ? [] : var.set
content {
name = item.value.name
value = item.value.value
}
}
dynamic "set_sensitive" {
iterator = item
for_each = var.set_sensitive == null ? [] : var.set_sensitive
content {
name = item.value.path
value = item.value.value
}
}
dynamic "postrender" {
iterator = item
for_each = var.postrender == null ? [] : [var.postrender]
content {
binary_path = item.value.binary_path
args = item.value.args
}
}
}