Run-airflow-migration and wait-for-airflow-migrations

Hi @cmukai and @johntam

I did more investigation and everything comes down helm_release does not trigger the helm hooks when wait=true. This was raised here: Helm post-install hooks are not triggered when used by `helm_release` and `wait = true` · Issue #683 · hashicorp/terraform-provider-helm · GitHub

This helm hooks runs the airflow db init command which creates the databased schema for airflow. This bug of helm-relese effects all of the airflow helm charts (official, astronomer, airflow-helm)

Possible solution set wait=false:

resource "helm_release" "airflow" {
  repository = "https://airflow-helm.github.io/charts"
  chart      = "airflow"
  name       = "airflow"
  version    = "8.0.9"
  namespace  = "airflow"
  wait       = false
}
1 Like