terraform-provider-grafana
terraform-provider-grafana copied to clipboard
Folder resource: Provider produced inconsistent result after apply
Terraform Version
- Terraform: 1.3.0
- Terraform Grafana Provider: 1.24.0 and 1.28.2
- Grafana: Grafana Cloud
Affected Resource(s)
- grafana_folder
Terraform Configuration Files
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "1.28.2"
}
}
}
provider "grafana" {
# this is for grafana apis. Required for adding dashboards
org_id = var.GRAFANA_ORG
url = var.GRAFANA_URL
auth = var.GRAFANA_AUTH
# this is for synthetic monitoring. required for adding synthetic monitor
sm_url = var.GRAFANA_SM_URL
sm_access_token = var.GRAFANA_SM_TOKEN
}
resource "grafana_folder" "folder_test" {
title = "test"
}
resource "grafana_dashboard" "dashboard_test" {
config_json = file("${path.module}/test.json")
overwrite = true
folder = grafana_folder.folder_test.id
}
Debug Output

Panic Output

Expected Behavior
Should have created the folder and the dashboard inside the folder.
Actual Behavior
Folder is created but terraform fails at that step, and doesn't create the dashboard.

Steps to Reproduce
terraform apply