https://github.com/terraform-providers/terraform-provider-helm/issues/354#issuecomment-541534473
Terraform v0.12.10
provider "helm" {
version = "~> 0.10"
}
data "helm_repository" "jetstack" {
name = "jetstack"
url = "https://charts.jetstack.io"
}
resource "helm_release" "cert_manager" {
repository = data.helm_repository.jetstack.metadata.0.name
name = "cert-manager"
chart = "cert-manager"
namespace = "cert-manager"
version = "v0.11.0-beta.0"
}
Release created with repo.
Error: repo jetstack not found
Thanks to @duxet here:
https://github.com/terraform-providers/terraform-provider-helm/issues/319#issuecomment-523766938
SOLUTION
provider "helm" {
version = "~> 0.10"
# ...
home = "${abspath(path.root)}/.helm"
# ...
}
Just if anyone else is running into it: Using a repo URL in repository param should also work:
provider "helm" {
version = "~> 0.10"
}
resource "helm_release" "cert_manager" {
repository = "https://charts.jetstack.io"
name = "cert-manager"
chart = "cert-manager"
namespace = "cert-manager"
version = "v0.11.0-beta.0"
}
P.S.
Actually, I think that should be the recommended way, instead of using helm_repository data/resource. It's even faster because terraform doesn't spent time on refreshing the state of helm_repository every time.
@legal90 big thanks for this info!
And I think that's more clear to read 馃槈
Actually, I think that should be the recommended way, instead of using
helm_repositorydata/resource. It's even faster because terraform doesn't spent time on refreshing the state ofhelm_repositoryevery time.
The only problem with this approach is lack of basic auth support. It's not possible to use https://www.terraform.io/docs/providers/helm/repository.html#username and https://www.terraform.io/docs/providers/helm/repository.html#password without data helm_repository
Most helpful comment
Just if anyone else is running into it: Using a repo URL in
repositoryparam should also work:P.S.
Actually, I think that should be the recommended way, instead of using
helm_repositorydata/resource. It's even faster because terraform doesn't spent time on refreshing the state ofhelm_repositoryevery time.