Manages the entire set of permissions for a folder. Permissions that aren't specified when applying this resource will be removed.
resource "grafana_team" "team" {
name = "Team Name"
}
resource "grafana_user" "user" {
email = "user.name@example.com"
login = "user.name"
password = "my-password"
}
resource "grafana_folder" "collection" {
title = "Folder Title"
}
resource "grafana_folder_permission" "collectionPermission" {
folder_uid = grafana_folder.collection.uid
permissions {
role = "Editor"
permission = "Edit"
}
permissions {
team_id = grafana_team.team.id
permission = "View"
}
permissions {
user_id = grafana_user.user.id
permission = "Admin"
}
}
folder_uid
(String) The UID of the folder.org_id
(String) The Organization ID. If not set, the Org ID defined in the provider block will be used.permissions
(Block Set) The permission items to add/update. Items that are omitted from the list will be removed. (see below for nested schema)id
(String) The ID of this resource.permissions
Required:
permission
(String) Permission to associate with item. Must be one of View
, Edit
, or Admin
.Optional:
role
(String) Name of the basic role to manage permissions for. Options: Viewer
, Editor
or Admin
.team_id
(String) ID of the team to manage permissions for. Defaults to 0
.user_id
(String) ID of the user or service account to manage permissions for. Defaults to 0
.Import is supported using the following syntax:
terraform import grafana_folder_permission.name "{{ folderUID }}"
terraform import grafana_folder_permission.name "{{ orgID }}:{{ folderUID }}"