File provisioning vs Terraform provider for repeatable local Grafana dashboards
0 reputation · 06 Feb 2022, 20:08 UTC
Goal is a repeatable local Grafana development environment where dashboards and datasources can be reproduced from a repository without manual API calls.
File-based provisioning loads datasources, dashboards and plugins from a mounted directory at startup and requires no external dependencies. The Terraform provider offers declarative descriptions with state tracking and drift detection but adds provider dependency and local state management.
Uncertainty centers on change handling and overwrite semantics. Default provisioning behavior and the effect of allowOverwrite, UID and folder collisions are version sensitive, and the interaction between file provisioning and Terraform for the same resources is not clearly defined for developer workflows.
Does file-based provisioning with allowOverwrite enabled produce deterministic results for a dashboard with a stable UID on fresh versus existing instances? Does drift detection behave consistently when the same datasource is described by both provisioning files and Terraform?