Zum Inhalt springen

Terraform Provider Portainer Updates & Release Notes

Einträge
36
Quellen
1
Zuletzt aktualisiert

Folge Terraform Provider Portainer, um die Release Notes in deinen Feed zu holen.

Terraform Provider Portainer von Portainer

v3.1.2

Release v3.1.2

Bug fixes

  • portainer_stack: an in-place update no longer gives a stack with stack_webhook = true a new GitOps webhook. While stack_webhook is unchanged, the plan keeps webhook_id and webhook_url and the update sends Portainer the same webhook, so the webhook URL your pipelines call keeps working. Turning stack_webhook off still removes the webhook, turning it on creates a new one, and a replaced stack gets a new one (#167).

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

v3.1.1

Release v3.1.1

Bug fixes

  • portainer_environment: updating an Agent environment (name, group, address, access policies) or creating one with user_access_policies / team_access_policies no longer fails on Portainer Business Edition with Unable to remove TLS CA file from disk (#165). The provider now sends a true tlsskipVerify / tlsskipClientVerify only when the flag or tls_enabled changes; false flags are still sent on every update, so rotated TLS certificates of Docker API environments are still picked up.

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

v3.1.0

Release v3.1.0

v3.1.0 is a minor release: configurations, state and import IDs written for v3.0.0 keep working without changes. Run terraform init -upgrade and terraform plan — the plan should be empty. See the upgrade guide for details.

Highlights

  • Built on terraform-plugin-framework. Every resource and data source moved from Plugin SDK v2 to the plugin framework with the same arguments, blocks, defaults, state layout and import IDs. Each resource is tested to plan no change on state written by v3.0.0. The provider still speaks protocol 5, so every Terraform and OpenTofu version that ran v3.0.0 runs v3.1.0.
  • Portainer Business Edition 3.1 support, including its built-in OIDC provider.
  • Ephemeral resources, actions, list resources and resource identity.
Feature Terraform OpenTofu
Ephemeral resources 1.10+ 1.11+
Import by resource identity 1.12+ not supported
Actions 1.14+ not supported
List resources (terraform query) 1.14+ not supported

New

Ephemeral resources — secrets for one run, never written to plan or state; anything Portainer creates server-side is removed when the run ends: portainer_user_api_key, portainer_auth, portainer_kubernetes_config, portainer_kubernetes_scoped_kubeconfig, portainer_endpoints_edge_generate_key, portainer_sshkeygen. …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

v3.0.0

Release v3.0.0

Portainer 3.0 support, D2K instead of Kompose, and a cleanup of what no longer works

v3.0.0 adds full support for Portainer Business Edition 3.0 and removes resources and attributes that had no effect. Most configurations upgrade without changes; read the upgrade guide and run terraform plan after upgrading.

Tested against Portainer CE 2.45.3 and 2.39.8, and Portainer Business Edition 2.45.3 and 3.0.1.

Breaking changes

  • Removed portainer_compose_convert. It ran the kompose binary on the Terraform machine. Use portainer_d2k_environment (BE 3.0) to run Docker workloads on Kubernetes, or portainer_stack_conversion (BE) to convert a stack to manifests.
  • Removed OpenAMT (portainer_open_amt, _activate, _devices_action, _devices_features). Portainer no longer has the API.
  • portainer_settings: enable_telemetry removed; display_donation_header, display_external_contributors and is_docker_desktop_extension are read-only. All four had no effect and were deprecated in v2.1.0.
  • portainer_restore: the setup token is write-only — use setup_token_wo + setup_token_wo_version.
  • portainer_alerting_rule: destroy deletes only rules the resource created. Adopted and imported rules (every rule managed with v2) are left in Portainer. …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

v2.2.0

Release v2.2.0

Kubernetes drift detection, in-place manifest updates, and more write-only secrets

A drop-in upgrade from v2.1.0: nothing was removed or renamed. A few fixes make Portainer do what your configuration already says, so check Before you upgrade - the first plan may show changes.

Tested against Portainer CE 2.45.3 and Business Edition 2.45.3.

Before you upgrade

  • Kubernetes drift shows up in the plan. Manifest resources now compare the fields your manifest sets with the live object, so changes made outside Terraform appear on the first plan, and applying puts your manifest back. Fields Kubernetes adds itself (status, defaults, canonical quantities like 500m) and fields your manifest doesn't set are ignored.
  • spec.replicas of a Deployment, StatefulSet or ReplicaSet is not compared or reverted (an HPA or portainer_kubernetes_deployment_scale owns it); it is sent only when you change it.
  • portainer_kubernetes_secret: manifest is now sensitive. Outputs exposing it need sensitive = true.
  • portainer_ssl: http_enabled = false now actually disables HTTP. Previously false was never sent.
  • Destroying a Swarm stack on a node that left the swarm now fails immediately with Portainer's message instead of retrying for minutes.

New …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

v2.1.0

Release v2.1.0

Secrets out of state, drift you can see, and resources that converge

This release addresses three gaps:

  • Secrets in state. Every secret the provider manages can now be passed as a write-only value. Such values never reach the Terraform state, so they can come from ephemeral resources such as ephemeral "vault_kv_secret_v2".
  • Invisible drift. Changes made in the Portainer UI now show up in the plan for webhooks, environment settings, TLS, resource controls and more, and those resources can be imported.
  • Configurations that never converged. Several resources planned changes on every run, or reported success for things that never happened. Those cases are fixed.

It is a drop-in upgrade from v2.0.1: nothing was removed or renamed. Still, read Before you upgrade. A few fixes make Portainer actually do what your configuration has said all along, and the first plan will show that.

Tested against Portainer CE 2.45.3 with Terraform 1.11 and 1.15 and with OpenTofu 1.12. The upgrade from v2.0.1 was tested over the whole end-to-end suite.

Before you upgrade

  • Outputs of edge_key and webhook_url need sensitive = true.
    • edge_key on portainer_environment and webhook_url on portainer_stack and portainer_edge_stack are now marked sensitive, as is tls_key on portainer_ldap_settings.
    • Terraform refuses an output that exposes a sensitive value without sensitive = true. …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 2.0.1

Mit v2.0.1 lassen sich Stacks im Status Error nach Korrektur der Compose-Datei wieder aktualisieren, und portainer_stack_delete_by_name sowie portainer_registry_connection funktionieren nun überhaupt (inklusive GitHub-Registries mit type = 8), wobei Konfigurationen, die diese beiden referenzieren, bis zur Anpassung beim Plan fehlschlagen.

v2.0.1

Fixed

  • Stacks left in Error can be updated again (#147) A stack whose deployment had failed refused every further apply, in a fraction of a second and without sending a request. The only way out was starting the stack by hand in the Portainer UI. Fixing the compose file and re-applying now recovers the stack. A deployment that this provider itself started and that fails is still reported as a failure.

  • portainer_stack_delete_by_name now works at all Every call failed with 400 Invalid query parameter: namespace. Portainer requires a namespace query parameter that its API specification does not document, so the resource never sent it.

  • portainer_registry_connection now works at all Every check failed with 400 Username and password are required. Portainer demands credentials for all registry types, including public ones, so the data source never reached the connection test it exists to run. GitHub registries (type = 8) are also accepted now; the type was capped at 7.

Action required

Both fixes add a required argument to something that could not have been in working use, so no running configuration changes behaviour - but configurations that reference these two will now fail at plan time until they are updated:

resource "portainer_stack_delete_by_name" "example" {
  name        = "legacy-app" …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 2.0.0

Version 2.0.0 ergänzt 81 neue Resources und Data Sources für die Business Edition API, behebt einen Stack-Deployment-Fehler unter Portainer 2.45 sowie ein Problem beim Anlegen von Edge-Agent-Environments und ersetzt Edge-Agent-Environments (Typ 4 und 7) bei geänderter Adresse künftig, wodurch ein neuer Edge-Key entsteht.

Release v2.0.0

Business Edition API coverage

This release roughly doubles what the provider can manage: 81 new resources and data sources covering the Business Edition API, alongside fixes for a stack deployment failure on Portainer 2.45 and a blocker that prevented Edge Agent environments from being created at all.

Nothing was removed or renamed. Every configuration valid on v1.35.0 is still valid, but read "Behaviour changes" before upgrading - one of them can replace an environment.

Behaviour changes

Edge Agent environments are replaced when their address changes. Portainer bakes the address into the edge key when the environment is created and never regenerates it, so an in-place update never actually took effect. Until now the provider emitted a warning and reported success, leaving the running agent on the old address. It now forces replacement instead, which issues a new edge key and means the agent has to be redeployed with it.

This only triggers for environment types 4 and 7, only when the address really changed, and not when the difference is the URL scheme alone. That last exclusion matters: Portainer normalises endpoint.URL down to the bare host, so environments created by older provider versions hold a scheme-less address in state and would otherwise be replaced on every apply.

Run terraform plan against your edge environments before upgrading. …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 1.35.0

Version 1.35.0 unterstützt Portainer 2.45.0 LTS mit neuen Kubernetes-Resources und -Data-Sources (u. a. Node Drain, Deployment Scale und Rollback), deckt die gesamte Portainer API ab (172 Resources und Data Sources) und enthält zwei Edge-Agent-Fixes.

Release v1.35.0

Support for Portainer 2.45.0 LTS, full coverage of the Portainer API, and two Edge Agent fixes.

The provider grows from 120 to 172 resources and data sources.

Portainer 2.45 support

2.45 introduced native Portainer APIs for Kubernetes alongside the kube-apiserver proxy. An audit of every route between 2.44.0 and 2.45.0 found the API delta is confined to the Kubernetes handler; everything else that changed upstream is internal refactoring with no payload change.

New resources:

  • portainer_kubernetes_node_drain - drain a node with all six kubectl drain options (force, timeout, grace period, ignore DaemonSets, delete emptyDir data, disable eviction)
  • portainer_kubernetes_deployment_scale - manage a deployment's replica count, with drift detection
  • portainer_kubernetes_deployment_rollback - roll a deployment back to an earlier revision
  • portainer_kubernetes_persistent_volume - pin a PersistentVolume's reclaim policy

New data sources: portainer_kubernetes_manifest_dry_run (validate manifests server-side before anything is applied), portainer_kubernetes_ingress_classes, portainer_kubernetes_resource_quotas, portainer_kubernetes_replicasets, portainer_kubernetes_deployments, portainer_kubernetes_pods, portainer_kubernetes_pod_logs.

Existing Kubernetes resources keep using the kube-apiserver proxy, so nothing changes for users on older Portainer versions.

GitOps …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 1.34.3

Version 1.34.3 sorgt dafür, dass active = false bei Repository-Stacks in portainer_stack bestehen bleibt, und portainer_environment mit type = 4 legt wieder einen Docker Edge Agent statt eines Kubernetes-Edge an.

Release v1.34.3

Bug Fixes

  • portainer_stack: active = false now persists on repository stacks (#139) - the update path stopped the stack before the git redeploy, which restarted it, so active = false never took effect (perpetual true -> false diff). The stop now runs after the redeploy.
  • portainer_environment: type = 4 creates a Docker Edge Agent, not Kubernetes (#140) - an Edge Agent create now sends ContainerEngine=docker, so Portainer provisions the requested Docker edge (type 4) instead of a Kubernetes edge (type 7).

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 1.34.2

Version 1.34.2 behebt in portainer_environment für Edge Agents, dass public_ip nie an Portainer gesendet wurde und dass environment_address bei jedem Plan von https://host zu host abwich.

Release v1.34.2

Fixed

Two Edge Agent fixes in portainer_environment:

  • public_ip was never sent to Portainer for Edge Agent environments (#137)

  • environment_address drifted from https://host to host on every plan (#136)

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 1.34.1

Version 1.34.1 stoppt mit active = false erstellte portainer_stack-Stacks direkt nach dem Deployment, vereinheitlicht intern HTTP-Aufrufe, ergänzt Tests und CI-Prüfungen und dokumentiert bislang fehlende Schema-Felder.

Release v1.34.1

Bug Fixes

  • portainer_stack: honor active = false on create (#134) — a stack created with active = false is now stopped right after deployment instead of coming up running. Previously the flag was only applied on update, so a new stack always started, and with ignore_changes = [active] it never stopped at all.

Internal / Maintenance

  • Unify direct-HTTP call sites behind a single doJSON helper (auth + status + JSON decode) across 97 files, with typed API errors and 404 handling.
  • Add a table-driven CRUD test harness (crudCase).
  • Add a schema↔docs drift-check linter as a new CI guard.
  • Parallelize the e2e CI pipeline (shared composite setup action + split docker/kubernetes/swarm, edge and ssl jobs).

Documentation

  • Document previously-missing schema fields: portainer_edge_stack.always_clone, portainer_settings.black_listed_labels, portainer_settings.edge_portainer_url.

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer Version 1.34.0

Version 1.34.0 unterstützt die Umgebungsvariablen HTTP_PROXY, HTTPS_PROXY und NO_PROXY, führt für portainer_stack das Attribut source_id für Portainer 2.43 STS ein und behebt damit den Passwortfehler beim Git-Stack-Deployment.

Release v1.34.0

Features

  • Proxy support: the provider now honors the standard HTTP_PROXY / HTTPS_PROXY / NO_PROXY environment variables when connecting to the Portainer endpoint. No-op when unset, so existing setups are unaffected. (#131)
  • portainer_stack: new source_id attribute for Portainer 2.43 STS, which replaced shared Git credentials with the Sources model. Both source_id (2.43+) and repository_git_credential_id (< 2.43) are sent, so one configuration works against old and new Portainer. (#132)

Fixes

  • portainer_stack: deploying a Git stack against Portainer 2.43 STS no longer fails with "Password must be specified when authentication is enabled"; set source_id (or fall back to inline repository_username/password). (#132)

Internal / Maintenance

  • Centralized duplicated auth-header and d.Set handling into shared helpers (setAuthHeader, setFields); no behavior change.
  • Raised unit-test coverage from ~77% to 85%.

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer 1.33.0

Terraform-Import und Drift-/Löschungserkennung sind jetzt für alle 17 Kubernetes-Ressourcen verfügbar, und ein Fehler bei portainer_stack-Kubernetes-Bereitstellungen wurde behoben.

Release v1.33.0

Highlights

  • Kubernetes brownfield adoption - terraform import and drift/deletion detection are now available for all 17 Kubernetes resources.
  • Fix: portainer_stack Kubernetes deployments no longer fail with Object not found (key=0) after a successful create (#130).

Added

  • Read + Importer implemented for all 17 Kubernetes resources: application, clusterrole, clusterrolebinding, configmap, cronjob, helm, ingress, job, namespace, namespace_system, role, rolebinding, secret, service, serviceaccount, storage, volume. This enables importing existing infrastructure and detects out-of-band deletion (404 → resource is recreated on the next plan). A shared k8sConfirmExistsByGET helper backs the 13 manifest-based resources.

Fixed

  • portainer_stack with deployment_type = "kubernetes" failed during the finalize step with 404 Object not found (key=0) when Portainer's create response did not include a usable stack Id (observed on Portainer 2.21.x). The provider now resolves the real stack ID by name + endpoint before finalizing.

Changed

  • Bump go.mongodb.org/mongo-driver 1.17.6 -> 1.17.7.

Upgrade notes

  • Read for the Kubernetes resources intentionally does not refresh the authored manifest / values / spec fields (the K8s API returns …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer 1.32.0

Fehlerbehebungen für edge_stack- und docker_secret-Ressourcen sowie eine Modernisierung des internen Codes ohne Konfigurationsänderungen.

Release v1.32.0

Bug fixes

  • edge_stack: non-destructive brownfield import. Read now populates the full state from GET /edge_stacks/{id} (git config, edge groups, deployment metadata, AutoUpdate/webhook fields) instead of only ~6 of ~20 returned fields, so terraform import no longer forces a destroy + recreate. repository_reference_name is no longer ForceNew (the git endpoint updates it in place); other git fields keep ForceNew. Verified live: import now yields No changes, and a ref-name change plans as ~ update in-place.
  • docker_secret: stable driver/templating on refresh. Read now flattens the API's {Name, Options} shape back into the flat map schema, fixing a refresh-time type error and state drift.

Internal modernization & quality (no breaking config changes)

  • Migrated all resources and data sources to context-aware CRUD (CreateContext/ReadContext/UpdateContext/DeleteContext returning diag.Diagnostics).
  • HTTP requests now honor Terraform's context (cancellation / timeouts) via http.NewRequestWithContext.
  • Importer.State → StateContext (dropped deprecated ImportStatePassthrough) and removed the -SA1019 staticcheck suppression.
  • Re-enabled errcheck on d.Set so schema-mapping bugs surface instead of being silently ignored.
  • Enabled 9 additional golangci-lint linters and fixed the fallout.
  • Raised unit-test coverage ~66% → ~78% (+~350 tests). …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Terraform Provider Portainer 1.30.0

Mehrere Ressourcen wurden repariert, Anmeldefelder als sensibel markiert, und die Go-Toolchain sowie Abhängigkeiten wurden aktualisiert.

Release 1.30.0

  • Fixes three broken resources, marks credential fields as sensitive, and updates the Go toolchain and dependencies.

Action required

Several token/credential fields are now Sensitive. If you expose any of them in an output, add sensitive = true or terraform apply will fail:

  • portainer_user.api_key_raw
  • portainer_webhook.token (resource and data source)
  • portainer_webhook_execute.token
  • portainer_cloud_credentials.credentials
  • portainer_settings → oauth_settings.kube_secret_key
output "generated_api_key" {
  value     = portainer_user.ci.api_key_raw
  sensitive = true   # now required
}

No state migration needed - values stay in state, just masked in CLI output.

Bug fixes

  • portainer_edge_configurations: fix "Missing form data value" on update against Portainer 2.39+ (correct multipart form fields). (#119)
  • portainer_shared_git_credential: fix create always failing with HTTP 500 ... key=0 (response envelope is now unwrapped). (#120)
  • portainer_open_amt: fix a doubled endpoint URL that prevented the resource from working.

Security & dependencies

  • Resolve all govulncheck findings (Go stdlib + golang.org/x/net).
  • Build with Go 1.26.3; bump terraform-plugin-sdk/v2 to v2.40.1 and refresh go-cty, go-openapi, and golang.org/x/net.

Documentation & examples

  • Added an Import section to every importable resource's docs page. …

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Portainer Terraform Provider 1.29.0

Der Provider erkennt Änderungen an Edge-Konfigurationsdateien über das neue Attribut file_sha256 und übernimmt keine bestehenden Edge-Konfigurationen mehr versehentlich.

Release 1.29.0

Fixed

  • portainer_edge_configurations: provider no longer adopts a pre-existing edge configuration when a same-name resource is created (#115)

Added

  • portainer_edge_configurations: detect changes to the underlying file at file_path via new computed file_sha256 attribute - re-upload is now triggered automatically when the file's contents change (#116)

Originalquelle(öffnet in neuem Tab)Problem melden

Terraform Provider Portainer von Portainer

Portainer Terraform Provider 1.28.0

Version 1.28.0 unterstützt Portainer 2.39 LTS, behebt Fehler bei Edge-Konfigurationen, Helm-Stacks und Sicherheitslücken und fügt zahlreiche neue Ressourcen und Datenquellen hinzu.

Release 1.28.0 - Portainer 2.39 LTS Support

Bug Fixes

  • Fix: edge configurations update not working — Implemented real PUT /edge_configurations/{id} instead of no-op, plus type mapping fix eliminating perpetual diff (#112)
  • Fix: Kubernetes Helm stack creation failing — Helm fields sent as top-level payload instead of nested helmConfig (#111)
  • Fix: edge configurations assigned wrong ID — Match by name instead of taking first result (#113 )
  • Fix: Go stdlib vulnerabilities — Toolchain bumped to go1.25.9 (GO-2026-4947, GO-2026-4946, GO-2026-4870, GO-2026-4865)

New Resources

  • portainer_policy — Fleet Governance Policies
  • portainer_alerting_settings / portainer_alerting_rule / portainer_alerting_silence — Alerting management
  • portainer_shared_git_credential / portainer_user_git_credential — Git credentials
  • portainer_ldap_settings — LDAP configuration
  • portainer_helm_user_repository / portainer_helm_rollback / portainer_stack_migrate

New Data Sources

  • portainer_policy / portainer_policy_template — Governance lookup
  • portainer_helm_git_dryrun / portainer_helm_release_history — Helm validation & history
  • portainer_gitops_repo_refs / portainer_gitops_repo_file — GitOps utilities
  • portainer_user_activity / portainer_role / portainer_kubernetes_crd / portainer_shared_git_credential

Improvements …

Originalquelle(öffnet in neuem Tab)Problem melden