Skip to content

Commit a00ec5c

Browse files
author
Dennis Ploeger
authored
Merge pull request #2 from kpshjk/more_options
2 parents b163ae9 + 0997d49 commit a00ec5c

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,44 @@ Type: `string`
8282

8383
Default: `""`
8484

85+
### set-list
86+
87+
Description: A list of additional settings to apply to the helm chart using the terraform `set{}` parameter. Example:
88+
```
89+
set-list = [
90+
{
91+
"name" = "prometheus.enabled",
92+
"value" = "false",
93+
"type" = "auto"
94+
},
95+
]
96+
```
97+
98+
Type:
99+
100+
```hcl
101+
list(object({
102+
name = string,
103+
value = string,
104+
type = string,
105+
}))
106+
```
107+
108+
Default: `[]`
109+
110+
### values
111+
112+
Description: A list of additional values to apply to the helm chart using the 'values = [...]' parameter. Example:
113+
```
114+
values = [
115+
"<yaml>",
116+
]
117+
```
118+
119+
Type: `list(string)`
120+
121+
Default: `[]`
122+
85123
## Outputs
86124

87125
No outputs.

main.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ resource "helm_release" "cert-manager" {
1616
name = "installCRDs"
1717
value = "true"
1818
}
19+
20+
dynamic "set" {
21+
for_each = var.set-list
22+
content {
23+
name = lookup(set.value, "name", null)
24+
value = lookup(set.value, "value", null)
25+
type = lookup(set.value, "type", null)
26+
}
27+
}
28+
29+
values = var.values
30+
1931
}
2032

2133
locals {

vars.tf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,37 @@ variable "cluster-issuers-yaml" {
2121
default = ""
2222
description = "The YAML code to define cluster issuers for cert-manager. Example: https://github.com/adfinis-sygroup/helm-charts/blob/master/charts/cert-manager-issuers/examples/letsencrypt-clusterissuers.yaml"
2323
}
24+
25+
variable "set-list" {
26+
type = list(object({
27+
name = string,
28+
value = string,
29+
type = string,
30+
}))
31+
default = []
32+
description = <<EOT
33+
A list of additional settings to apply to the helm chart using the terraform `set{}` parameter. Example:
34+
```
35+
set-list = [
36+
{
37+
"name" = "prometheus.enabled",
38+
"value" = "false",
39+
"type" = "auto"
40+
},
41+
]
42+
```
43+
EOT
44+
}
45+
46+
variable "values" {
47+
type = list(string)
48+
default = []
49+
description = <<EOT
50+
A list of additional values to apply to the helm chart using the 'values = [...]' parameter. Example:
51+
```
52+
values = [
53+
"<yaml>",
54+
]
55+
```
56+
EOT
57+
}

0 commit comments

Comments
 (0)