Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform plan got error because local chart not rendered yet #1348

Closed
shuliakovsky opened this issue Apr 5, 2024 · 5 comments
Closed

terraform plan got error because local chart not rendered yet #1348

shuliakovsky opened this issue Apr 5, 2024 · 5 comments
Labels

Comments

@shuliakovsky
Copy link

shuliakovsky commented Apr 5, 2024

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: v1.7.5
Provider version: v2.13.0
Kubernetes version: 1.29

Affected Resource(s)

  • helm_release

Terraform Configuration Files

# rendering chart
resource "local_file" "this" {
  count    = length(local.template_files) # Define right template
  filename = "${path.module}/${var.eks_cluster_name}/helm/${var.project}/${local.template_files[count.index]}"
  content  = templatefile("${path.module}/templates/${local.template_files[count.index]}", local.helmChartVariables)
}
resource "time_sleep" "wait_15_seconds" {
  depends_on      = [local_file.this]
  create_duration = "15s"
  triggers = {
    always_run = timestamp() # Always run
  }
}
# Deploy rendered helm-chart
resource "helm_release" "this" {
  name      = var.project
  chart     = "${path.module}/${var.eks_cluster_name}/helm/${var.project}"
  namespace = var.environment
  wait      = true
  timeout   = 600
  depends_on = [
    local_file.this,
    time_sleep.wait_15_seconds,
  ]
}

Debug Output

NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.

Panic Output

non

Steps to Reproduce

  1. terraform plan

Expected Behavior

plan working without error

Actual Behavior

Error: path "../../" not found

Important Factoids

References

Fix manifest diffs for OCI charts (#1326)

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@shuliakovsky
Copy link
Author

d533734#comments
link where error is happening

@shuliakovsky
Copy link
Author

temporary solution is: locking provider version on any previous one which fits you i.e.

terraform {
  required_providers {
    helm = {
      version = "2.12.1"
      source  = "hashicorp/helm"
    }
  }

@jrhouston
Copy link
Contributor

Thanks for opening this @shuliakovsky. This looks like a regression, I'm going to revert the change mentioned above.

@MrImpossibru
Copy link

I’m getting an error about “repo build not found” during the plan stage with the new provider version. Looks like almost the same problem.

@shuliakovsky
Copy link
Author

fixed in v2.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants