You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Create** uploads a configuration file and sets the name, type, and association to edge groups.
27
-
-**Update** updates the configuration via `PUT /edge_configurations/{id}` (supports changing `type`, `edge_group_ids`, and `file_path`).
27
+
-**Update** updates the configuration via `PUT /edge_configurations/{id}` (supports changing `type`, `edge_group_ids`, and `file_path`, and is also triggered when the contents of the file at `file_path` change — see `file_sha256` below).
28
28
-**Delete** removes the configuration via `DELETE /edge_configurations/{id}`.
29
-
-**Read** retrieves metadata and synchronizes state with Portainer using `GET /edge_configurations/{id}`.
29
+
-**Read** retrieves metadata and synchronizes state with Portainer using `GET /edge_configurations/{id}`. The Portainer API does not return file content or any digest, so `file_sha256` is preserved from state and recomputed locally during plan.
30
+
31
+
> 💡 **File content change detection:** During plan the provider reads `file_path` and computes its SHA256 into the `file_sha256` computed attribute. If the new hash differs from state, Terraform plans an in-place Update — even when `file_path` itself didn't change. This means rewriting the file in place (or `terraform apply` after the file's bytes change) will correctly re-upload it. `file_path` must be readable at plan time.
32
+
33
+
> ⚠️ **Same-name limitation:** Portainer's `POST /edge_configurations` endpoint does not return the new configuration's ID. To resolve the ID after create, the provider snapshots existing edge configurations matching the requested `name`*before* the POST and picks the new entry that appears afterwards. If multiple entries appear (concurrent writers) the most recently created one is chosen. Because Portainer permits multiple edge configurations with the same `name`, **avoid creating Terraform-managed and out-of-band configurations with identical names** — if a same-name entry is created concurrently with `terraform apply`, the provider may bind to the wrong record. This will be fully resolved once Portainer returns the ID on POST.
0 commit comments