terraform helm_release resource for official airflow helm chart

853 Views Asked by At

I was trying to deploy official helm chart for airflow using terraform helm release. But it says the chart repository not found. i put the repository url. May be the url is wrong.

  repository = "https://airflow.apache.org"
  chart      = "apache-airflow"
  name       = "airflow"
  version    = "1.7.0"
  namespace  = "airflow"
  values     = [file("${path.module}/values.yaml")]
}

Getting this error message:

Error: could not download chart: chart "apache-airflow" version "1.7.0" not found in https://airflow.apache.org repository
1

There are 1 best solutions below

0
On

I figured it out. As per instructions from the artifacthub.io [1], the chart name is actually only airflow (and not apache-airflow), so the code needs to look like:

resource "helm_release" "airflow" {
  repository = "https://airflow.apache.org"
  chart      = "airflow"
  name       = "airflow"
  version    = "1.7.0"
  namespace  = "airflow"
  values     = [file("${path.root}/airflow-values.yaml")]
}

where the file aiflow-values.yaml is the one from their documentation used when installing with terraform [2].


[1] https://artifacthub.io/packages/helm/apache-airflow/airflow?modal=install

[2] https://airflow.apache.org/docs/helm-chart/stable/index.html#installing-the-chart-with-argo-cd-flux-or-terraform