Terraform-provider-helm: Helm3: ReadString: expects " or n, but found t

Created on 29 Jul 2020  路  9Comments  路  Source: hashicorp/terraform-provider-helm

Terraform Version and Provider Version

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

Provider Version

v1.2.3

Affected Resource(s)

nginx-ingress

Terraform Configuration Files

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"
  }
}

Expected Behavior

Should work with no problem

Actual Behavior

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.

bug needs-investigation

Most helpful comment

Making values as "\"true\"" works, but this is definitely a bug.

All 9 comments

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 :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iliasbertsimas picture iliasbertsimas  路  12Comments

alexkreidler picture alexkreidler  路  71Comments

dfry picture dfry  路  14Comments

aaronmell picture aaronmell  路  22Comments

adaphi picture adaphi  路  11Comments