Skip to content

feat!: support hashicorp/helm provider 3.x#12

Open
KOCEAN33 wants to merge 1 commit into
gitops-bridge-dev:mainfrom
KOCEAN33:feat/helm-provider-v3-support
Open

feat!: support hashicorp/helm provider 3.x#12
KOCEAN33 wants to merge 1 commit into
gitops-bridge-dev:mainfrom
KOCEAN33:feat/helm-provider-v3-support

Conversation

@KOCEAN33

Copy link
Copy Markdown

What

Migrate the module to the hashicorp/helm provider 3.x API.

Why

helm provider 3.0 adopted the Terraform Plugin Framework and replaced the nested blocks with list/object attributes, in both the helm_release resource and the provider configuration. This module used the legacy dynamic "set" / dynamic "postrender" block form, so it does not work with helm >= 3.0. Closes #7.

Changes

  • main.tf — convert set, set_sensitive, postrender from dynamic blocks to the attribute form:
    postrender    = try(var.argocd.postrender, null)
    set           = try(var.argocd.set, null)
    set_sensitive = try(var.argocd.set_sensitive, null)
    Values pass through from var.argocd, so the public argocd input shape is unchanged for callers already supplying set = [{ name, value }].
  • versions.tf — raise the helm provider floor to >= 3.0.0.
  • tests/complete — update provider "helm" to the v3 attribute form (kubernetes = { ... }) and remove the unused, undeclared provider "kubectl" block that blocked terraform init.
  • README.md — regenerated provider/requirement version.

Breaking change

Requires helm provider >= 3.0.0. Consumers still on helm 2.x should stay on the 0.1.x line — see the < 3.0.0 cap in #11. Suggest releasing this as 0.2.0.

Verification

# root module
$ terraform init -backend=false && terraform validate
Success! The configuration is valid.   # helm 3.2.0

# tests/complete
$ terraform init -backend=false && terraform validate
Success! The configuration is valid.   # helm 3.2.0

DCO: commit signed off via git commit -s.

The helm provider 3.0 migrated to the Terraform Plugin Framework. Nested
blocks were replaced by list/object attributes in both the `helm_release`
resource and the provider configuration. This module still used the legacy
block form and was incompatible with helm >= 3.0 (refs gitops-bridge-dev#7).

Changes:
- main.tf: convert `set`, `set_sensitive`, and `postrender` from `dynamic`
  blocks to the attribute form (`set = [...]`, `postrender = {...}`). The
  values pass through from `var.argocd`, so the public input shape for the
  `argocd` variable is unchanged.
- versions.tf: raise the helm provider floor to `>= 3.0.0`.
- tests/complete: update the `provider "helm"` block to the v3 attribute
  form (`kubernetes = { ... }`) and drop the unused, undeclared
  `provider "kubectl"` block that blocked `terraform init`.

BREAKING CHANGE: requires the helm provider >= 3.0.0. Consumers still on
helm 2.x must stay on the 0.1.x line (see the < 3.0.0 cap in gitops-bridge-dev#11).

Verified with `terraform validate` against helm 3.2.0 for both the root
module and tests/complete.

Signed-off-by: kocean33 <dev@xanny.us>
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.

Terraform Resource: helm_release 3.0.1 incompatibility requires fix

1 participant