resource "grafana_folder" "test_folder" {
title = "Terraform Test Folder"
}
resource "grafana_dashboard" "test_folder" {
folder = grafana_folder.test_folder.id
config_json = <<EOD
{
"title": "Dashboard in folder",
"uid": "dashboard-in-folder"
}
EOD
}
resource "grafana_folder" "test_folder_with_uid" {
uid = "test-folder-uid"
title = "Terraform Test Folder With UID"
}
title
(String) The title of the folder.org_id
(String) The Organization ID. If not set, the Org ID defined in the provider block will be used.parent_folder_uid
(String) The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.prevent_destroy_if_not_empty
(Boolean) Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to false
.uid
(String) Unique identifier.id
(String) The ID of this resource.url
(String) The full URL of the folder.Import is supported using the following syntax:
terraform import grafana_folder.name "{{ uid }}"
terraform import grafana_folder.name "{{ orgID }}:{{ uid }}"