holms@debian ~/D/c/s/b/t/s/post-infra> terraform -v
Terraform v0.12.26
+ provider.cloudflare v2.0.1
+ provider.digitalocean v1.21.0
+ provider.google-beta v3.31.0
+ provider.helm v1.2.3
+ provider.kubernetes v1.11.4
Your version of Terraform is out of date! The latest version
is 0.12.29. You can update by downloading from https://www.terraform.io/downloads.html
v1.2.3
nginx-ingress
resource "helm_release" "nginx_ingress" {
name = "nginx-ingress"
chart = "stable/nginx-ingress"
namespace = "nginx-ingress"
set {
name = "controller.publishService.enabled"
value = "true"
}
set {
name = "controller.config.use-forwarded-headers"
value = "true"
}
}
Should work with no problem
helm_release.nginx_ingress: Creating...
Error: ConfigMap in version "v1" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects " or n, but found t, error found in #10 byte of ...|headers":true},"kind|..., bigger context ...|apiVersion":"v1","data":{"use-forwarded-headers":true},"kind":"ConfigMap","metadata":{"annotations":|...
Helm3 is used btw.
Making values as "\"true\"" works, but this is definitely a bug.
+1
Terraform v0.12.29
provider.helm v1.2.4
set {
name = "controller.service.annotations.service\\.beta\\.kubernetes\\.io/azure-load-balancer-internal"
value = "true"
}
Error: unable to build kubernetes objects from release manifest: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte of ...|nternal":true},"labe|..., bigger context ...|beta.kubernetes.io/azure-load-balancer-internal":true},"labels":{"app.kubernetes.io/instance":"[snip]|...
Running helm template outside of provider with the generated values file works as expected.
Archer Bencic
Setting type = "string" in the set block might help here.
Setting type = "string" does not seem to do the trick.
yeh, it worked with explicitly setting type="string"
Does not work with value = "\"true\"" or type = "string" for bitnami/nginx helm chart where boolean type is required.
resource "helm_release" "nginx" {
name = "nginx"
repository = "https://charts.bitnami.com/bitnami"
chart = "nginx"
version = "7.1.0"
set {
name = "metrics.enabled"
value = "true"
type = "string"
}
}
With type = "string":
Error: values don't meet the specifications of the schema(s) in the following chart(s):
nginx:
- metrics.enabled: Invalid type. Expected: boolean, given: string
on nginx.tf line 1, in resource "helm_release" "nginx":
1: resource "helm_release" "nginx" {
With value = true:
Error: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte of ...|/scrape":true},"labe|..., bigger context ...|rometheus.io/port":"9113","prometheus.io/scrape":true},"labels":{"app.kubernetes.io/instance":"nginx|...
on nginx.tf line 1, in resource "helm_release" "nginx":
1: resource "helm_release" "nginx" {
Duh, this bugged me too.. hope this gets fixed?
is there any ETA when it will be fixed? thanks :)
Most helpful comment
Making values as
"\"true\""works, but this is definitely a bug.