Skip to content

fix: Removed 'upgrade_install' arg in the main.tf for Helm 3.x compatability #120

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wamsatson
Copy link

↪️ Pull Request

  • Make sure you are opening from a feature/feat/docs/fix/bug/hotfix/stable/chore (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry

📒 Description

Remove the upgrade_install argument from helm_release resource to fix compatibility with Helm provider >= 3.0.

🕶️ Types of changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation
  • Dependencies

🤯 List of changes

The upgrade_install argument was added here but causes errors with the upgrade of the Helm version

Error: Unsupported argument "upgrade_install" is not expected here.

👫 Relationships

🔎 Review hints

In case the versions of things matter:

❯ terragrunt --version
terragrunt version 0.71.5
❯ terraform --version
Terraform v1.5.7
on darwin_arm64
+ provider registry.terraform.io/hashicorp/helm v3.0.2

🚨 Test instructions

  1. Create a test directory:
    mkdir helm-test && cd helm-test && touch terragrunt.hcl

  2. Paste this basic terragrunt in the terragrunt.hcl:

terraform {
  source = "tfr:///terraform-module/release/helm?version=2.9.1"
}

inputs = {
  name       = "test-app"
  namespace  = "default" 
  repository = "https://charts.bitnami.com/bitnami"
  
  app = {
    name    = "test-nginx"
    chart   = "nginx"  
    deploy  = true
    version = "15.1.0"
  }
  
  values = [""]
}
  1. Run terragrunt init
  2. Run terragrunt plan , and you should expect to see an error that looks like:
❯ terragrunt plan
16:07:58.080 INFO   Downloading Terraform configurations from tfr:///terraform-module/release/helm?version=2.9.1 into ./.terragrunt-cache/GGYofYU_9E7M9qgPVvudKFa8ixc/7fGEBRhljozgWJzF6D5kU7_RvaE
16:07:58.592 INFO   terraform: Initializing the backend...
16:07:58.595 INFO   terraform: Initializing provider plugins...
16:07:58.595 INFO   terraform: - Finding hashicorp/helm versions matching ">= 3.0.0"...
16:07:58.786 INFO   terraform: - Installing hashicorp/helm v3.0.2...
16:07:59.338 INFO   terraform: - Installed hashicorp/helm v3.0.2 (signed by HashiCorp)
16:07:59.338 INFO   terraform: Terraform has created a lock file .terraform.lock.hcl to record the provider
16:07:59.338 INFO   terraform: selections it made above. Include this file in your version control repository
16:07:59.338 INFO   terraform: so that Terraform can guarantee to make the same selections by default when
16:07:59.338 INFO   terraform: you run "terraform init" in the future.
16:07:59.339 INFO   terraform: Terraform has been successfully initialized!
16:07:59.339 INFO   terraform: 
16:07:59.339 INFO   terraform: You may now begin working with Terraform. Try running "terraform plan" to see
16:07:59.339 INFO   terraform: any changes that are required for your infrastructure. All Terraform commands
16:07:59.339 INFO   terraform: should now work.
16:07:59.339 INFO   terraform: If you ever set or change modules or backend configuration for Terraform,
16:07:59.339 INFO   terraform: rerun this command to reinitialize your working directory. If you forget, other
16:07:59.339 INFO   terraform: commands will detect it and remind you to do so if necessary.
16:08:02.644 STDERR terraform: ╷
16:08:02.644 STDERR terraform: │ Error: Unsupported argument
16:08:02.644 STDERR terraform: │ 
16:08:02.644 STDERR terraform: │   on main.tf line 33, in resource "helm_release" "this":
16:08:02.644 STDERR terraform: │   33:   upgrade_install            = lookup(var.app, "upgrade_install", false)
16:08:02.644 STDERR terraform: │ 
16:08:02.644 STDERR terraform: │ An argument named "upgrade_install" is not expected here.
16:08:02.644 STDERR terraform: ╵
16:08:02.647 ERROR  terraform invocation failed in ./.terragrunt-cache/GGYofYU_9E7M9qgPVvudKFa8ixc/7fGEBRhljozgWJzF6D5kU7_RvaE
16:08:02.647 ERROR  error occurred:

* Failed to execute "terraform plan" in ./.terragrunt-cache/GGYofYU_9E7M9qgPVvudKFa8ixc/7fGEBRhljozgWJzF6D5kU7_RvaE
  ╷
  │ Error: Unsupported argument
  │ 
  │   on main.tf line 33, in resource "helm_release" "this":
  │   33:   upgrade_install            = lookup(var.app, "upgrade_install", false)
  │ 
  │ An argument named "upgrade_install" is not expected here.
  ╵
  
  exit status 1
  1. Commenting out the upgrade_install argument in the terragrunt-cache/....../main.tf lets you run terragrunt plan error free

Checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • [] Added/updated unit tests for this change
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).
  • Filled out test instructions (In case there aren't any unit tests)
  • I followed the existing code standards and didn't mess up the formatting.
  • My change requires a change to the documentation.
  • I did my best to add documentation to any public classes or methods I added.
  • Included links to related issues/PRs

@wamsatson wamsatson changed the title Removed 'upgrade_install' arg in the main.tf for Helm 3.x compatability fix: Removed 'upgrade_install' arg in the main.tf for Helm 3.x compatability Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant