terraform-provider-grafana
terraform-provider-grafana copied to clipboard
Grafana folder permission bug in provider!
Terraform Version
- Terraform: ">= 0.13"
- Terraform Grafana Provider: "1.24.0"
- Grafana: v9.0.2
Please list the resources as a list, for example:
- grafana_folder
- grafana_folder_permission
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
resource "grafana_folder" "collection" { uid = "finance-data-folder" title = "Finance Data Quality" }
resource "grafana_folder_permission" "collectionPermission" { folder_uid = "finance-data-folder" permissions { role = "Editor" permission = "Edit" } } }
### Debug Output
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to grafana_folder.collection, provider
│ "provider[\"registry.terraform.io/grafana/grafana\"]" produced an
│ unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
When trying to create a folder and add permissions. Normally it should create a folder with that permission.
But actually this error happened.
### Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
1. terraform init
2. terraform apply
3. terraform build
Same issue for me for the same versions, looking forward to the new release of provider with updated grafana go client, maybe this will help. Btw, does anybody knows, how I can try provider from github master?
Same for me, same versions, just creating the folder, switched to creating folder manually and using a data resource for the moment
I'm unable to reproduce this. Is this the full Terraform configuration?
This now works for me with Terraform Grafana Provider: "1.28.0" with an admin level token
Thanks @markspace. I'll close this but if anyone still has the issue, feel free to comment here and I'll reopen it!
I'm experiencing the same error with provider 1.32.1 (same problem with 1.28.0)
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "1.32.0"
}
}
}
provider "grafana" {
url = "<redacted>"
auth = "<redacted>"
}
resource "grafana_folder" "test-folder-30" {
uid = "test-folder-uid-030"
title = "Terraform Test Folder 030"
}
terraform apply creates the folder but ends up in error
│ Error: Provider produced inconsistent result after apply
Hey, I think this was actually a duplicate of https://github.com/grafana/terraform-provider-grafana/issues/665. Creating folders with an editor token, not an admin seems to not work for Terraform