forked from lablabs/terraform-aws-eks-cert-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelm.tf
56 lines (45 loc) · 1.23 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
56
resource "helm_release" "this" {
count = var.enabled && !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
values = [
data.utils_deep_merge_yaml.values[0].output
]
dynamic "set" {
for_each = var.settings
content {
name = set.key
value = set.value
}
}
}
resource "time_sleep" "default_cluster_issuer" {
count = var.enabled && var.cluster_issuer_enabled ? 1 : 0
create_duration = "30s"
depends_on = [
helm_release.this
]
}
resource "helm_release" "default_cluster_issuer" {
count = var.enabled && var.cluster_issuer_enabled ? 1 : 0
chart = "${path.module}/helm/defaultClusterIssuer"
name = "${var.helm_release_name}-cluster-issuer"
namespace = var.k8s_namespace
values = [
data.utils_deep_merge_yaml.default_cluster_issuer_values[0].output
]
dynamic "set" {
for_each = var.cluster_issuer_settings
content {
name = set.key
value = set.value
}
}
depends_on = [
time_sleep.default_cluster_issuer[0]
]
}