From 09ff329cfbebf33cb8933d861a6c5fb6c4d92257 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:34:50 +0200 Subject: [PATCH] [v11.0.x] Docs: add pinning of terraform for migration (#88583) Docs: add pinning of terraform for migration (#88528) * Docs: update with terraform version * added the terraform version pinning * formatting * Update docs/sources/administration/api-keys/index.md Co-authored-by: Jack Baldry * formatting --------- Co-authored-by: Jack Baldry (cherry picked from commit 221e036233bd182ede3efc5848eef001ee39a0c3) Co-authored-by: Eric Leijonmarck --- docs/sources/administration/api-keys/index.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/sources/administration/api-keys/index.md b/docs/sources/administration/api-keys/index.md index bc4a5b6cd0d..2134e38efeb 100644 --- a/docs/sources/administration/api-keys/index.md +++ b/docs/sources/administration/api-keys/index.md @@ -182,6 +182,25 @@ curl --request GET --url http://localhost:3000/api/folders --header 'Authorizati ### Migrate API keys to Grafana service accounts in Terraform +{{< admonition type="note" >}} +The terraform resource `api_key` is removed from the Grafana Terraform Provider in v3.0.0. +Before you migrate and remove the use of the resource, you should pin your terraform version to a version less-than or equal-to v2.19.0. +For more information, refer to the [Grafana Terraform Provider release notes](https://github.com/grafana/terraform-provider-grafana/releases/tag/v3.0.0). +{{< /admonition >}} + +To pin the Grafana Terraform Provider to v2.19.0: + +```hcl +terraform { + required_providers { + grafana = { + source = "grafana/grafana" + version = "2.19.0" + } + } +} +``` + This section shows you how to migrate your Terraform configuration for API keys to Grafana service accounts. For resources, see [Grafana Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/service_account_token). For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).