Recommended upgrade procedure
Bump the Terraform provider to the latest v2 version, apply, then upgrade to v3 and remove/replace all the attributes that have been removed.
Major features
Terraform Config Generation (Alpha version)
See the README here.
This is a new tool that will be developed further in future releases. It can be pointed at a Grafana instance or at a Grafana Cloud account and it will find all Grafana provider resources and generate the Terraform config for them.
Example (with the binary from this release):
./terraform-provider-grafana-generate_3.0.0_darwin_arm64 --output-dir test --grafana-auth=admin:admin --grafana-url=http://localhost:3000/
Grafana 11 Support
Some Terraform features had to be removed to enable full Grafana 11 support. All resources should now work with Grafana 11 (Cloud, on-prem Enterprise and on-prem OSS).
Breaking changes
Removed the global (provider-level) org_id
setting
Reasons for its removal:
- The attribute was already added on each resource, so it doesn't remove any functionality
- It's irrelevant to all parts of the provider other than Grafana resources, possibly causing confusing since there's also an org concept on cloud resources
- Even for Grafana, it does not apply to all resources. For example, users are not org-scoped. By setting it on a resource level, this is much better defined
- When using it globally, it prevents looping on multiple orgs. Ex: Create dashboards for a list of orgs. Providers cannot be created dynamically
Removed support for old ID separators (converge on :
)
This makes importing resources consistent across all parts of the provider. For example:
terraform import grafana_folder.test orgID:folderUID
terraform import grafana_dashboard.test orgID:dashboardUID
Removed deprecated resources
grafana_api_key
: Usegrafana_service_account
insteadgrafana_cloud_stack_api_key
: Usegrafana_cloud_stack_service_account
insteadgrafana_cloud_api_key
: Usegrafana_cloud_access_policy
insteadgrafana_oncall_action
: Usegrafana_oncall_outgoing_webhook
instead
Removed deprecated attributes
- Removed numerical IDs (of dashboards, folders, datasources) in favour of UIDs
grafana_report
dashboard definition converged onto a singledashboards {}
block
Changelog
- SSO: Improve SSO settings examples by @dmihai in #1549
- Deprecate global
org_id
config by @julienduchesne in #1516 - Deprecate old ID separators by @julienduchesne in #1518
- Deprecate Cloud API keys by @julienduchesne in #1517
- Remove all deprecated attributes and resources by @julienduchesne in #1529
- Fix README links and images by @julienduchesne in #1554
- Add goreleaser config for code generation tool by @julienduchesne in #1555
- Code Generation: Add readme and warnings by @julienduchesne in #1556
- Link changelog in TF provider docs by @julienduchesne in #1559
- Update synthetic monitoring frequency value validation by @tomaszgawliksa in #1561
- Clear out CHANGELOG.md by @julienduchesne in #1560
- Bump github.com/hashicorp/terraform-plugin-mux from 0.15.0 to 0.16.0 in the terraform group by @dependabot in #1562
- Bump github.com/fatih/color from 1.16.0 to 1.17.0 by @dependabot in #1564
- Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.6 by @dependabot in #1563
- Run tests on Grafana v11 by @julienduchesne in #1415
- Cloud: Fix SM installation test by @julienduchesne in #1568
- Cloud: More test fixes by @julienduchesne in #1569
New Contributors
- @tomaszgawliksa made their first contribution in #1561
Full Changelog: v2.19.0...v3.0.0