forked from lablabs/terraform-helm-argocd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helm.tf
55 lines (49 loc) · 1.4 KB
/
helm.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
resource "helm_release" "this" {
count = var.enabled && !var.self_managed && !var.argo_application_enabled ? 1 : 0
chart = var.helm_chart_name
create_namespace = var.helm_create_namespace
namespace = var.k8s_namespace
name = var.helm_release_name
version = var.helm_chart_version
repository = var.helm_repo_url
wait = var.helm_wait
timeout = var.helm_timeout
cleanup_on_fail = var.helm_cleanup_on_fail
atomic = var.helm_atomic
values = [
var.values
]
dynamic "set" {
for_each = var.settings
content {
name = set.key
value = set.value
}
}
}
resource "helm_release" "self_managed" {
count = var.enabled && var.self_managed && !var.argo_application_enabled ? 1 : 0
chart = var.helm_chart_name
create_namespace = var.helm_create_namespace
namespace = var.k8s_namespace
name = var.helm_release_name
version = var.helm_chart_version
repository = var.helm_repo_url
wait = var.helm_wait
timeout = var.helm_timeout
cleanup_on_fail = var.helm_cleanup_on_fail
atomic = var.helm_atomic
values = [
var.values
]
dynamic "set" {
for_each = var.settings
content {
name = set.key
value = set.value
}
}
lifecycle {
ignore_changes = all
}
}