I'm having issues getting the ingress-nginx Helm Chart to install via Terraform with Minikube, yet I'm able to install it successfully via the command line. Here is my vanilla Terraform code -
provider "kubernetes" {
host = "https://127.0.0.1:63191"
client_certificate = base64decode(var.client_certificate)
client_key = base64decode(var.client_key)
cluster_ca_certificate = base64decode(var.cluster_ca_certificate)
}
provider "helm" {
kubernetes {
}
}
resource "helm_release" "nginx" {
name = "beta-nginx"
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
namespace = "default"
}
I get the following logs when I apply the Terraform code above -
helm_release.nginx: Still creating... [4m31s elapsed]
2022-01-26T14:32:49.623-0600 [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/helm\"] (close)"
2022-01-26T14:32:49.624-0600 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "helm_release.nginx"
2022-01-26T14:32:49.624-0600 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/helm\"] (close)" is waiting for "helm_release.nginx"
2022-01-26T14:32:51.299-0600 [INFO] provider.terraform-provider-helm_v2.4.1_x5: 2022/01/26 14:32:51 [DEBUG] Service does not have load balancer ingress IP address: default/beta-nginx-ingress-nginx-controller: timestamp=2022-01-26T14:32:51.299-0600
2022-01-26T14:32:53.302-0600 [INFO] provider.terraform-provider-helm_v2.4.1_x5: 2022/01/26 14:32:53 [DEBUG] Service does not have load balancer ingress IP address: default/beta-nginx-ingress-nginx-controller: timestamp=2022-01-26T14:32:53.302-0600
2022-01-26T14:32:54.626-0600 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/helm\"] (close)" is waiting for "helm_release.nginx"
Warning: Helm release "beta-nginx" was created but has a failed status. Use the `helm` command to investigate the error, correct it, then run Terraform again.
with helm_release.nginx,
on main.tf line 21, in resource "helm_release" "nginx":
21: resource "helm_release" "nginx" {
Error: timed out waiting for the condition
with helm_release.nginx,
on main.tf line 21, in resource "helm_release" "nginx":
21: resource "helm_release" "nginx" {
When I try installing the Helm Chart via the command line helm install beta-nginx ingress-nginx/ingress-nginx it installs the chart no problem.
Here are a few version numbers:
| Terraform | 1.0.5 |
| Minikube | 1.25.1 |
| Kubernetes | 1.21.7 |
| Helm | 3.7.2 |