nicholaswilde / helm-charts

My collection of Helm charts.
https://artifacthub.io/packages/search?repo=nicholaswilde
Apache License 2.0
70 stars 32 forks source link

Error installing from Terraform helm_release when lint enabled #103

Open Spritekin opened 1 year ago

Spritekin commented 1 year ago

Details

I setup my terraform helm_release like this:

oss_prod_etherpad/main.tf
---------------------------------------------------------
resource "helm_release" "etherpad" {
  name       = local.name
  repository = "https://nicholaswilde.github.io/helm-charts/"
  chart      = "etherpad"
  version    = "1.0.2"
  namespace  = var.namespace

  lint = true

  values = [ ""  ]
}
---------------------------------------------------------

However when terrraform plans this module, lint is applied and Terraform returns:

Error: malformed chart or values: templates/common.yaml: unable to parse YAML: invalid Yaml document separator: kind: PersistentVolumeClaim templates/common.yaml: unable to parse YAML: invalid Yaml document separator: kind: PersistentVolumeClaim
with module.oss_prod_etherpad.helm_release.etherpad
on .terraform/modules/oss_prod_etherpad/main.tf line 34, in resource "helm_release" "etherpad":

resource "helm_release" "etherpad" {

However if I remove the lint = true like this:

oss_prod_etherpad/main.tf
---------------------------------------------------------
resource "helm_release" "etherpad" {
  name       = local.name
  repository = "https://nicholaswilde.github.io/helm-charts/"
  chart      = "etherpad"
  version    = "1.0.2"
  namespace  = var.namespace

  values = [ ""  ]
}
---------------------------------------------------------

Then the plan finishes successfully and it proceeds to install (it fails somewhere else but just because my storage class definitions, not because of the YAML structure).

So something might be wrong with the chart definition. It would be nice if we could lint this.