Manages a single permission item for a dashboard. Conflicts with the "grafana_dashboard_permission" resource which manages the entire set of permissions for a dashboard.
resource "grafana_team" "team" {
name = "Team Name"
}
resource "grafana_user" "user" {
email = "user.name@example.com"
password = "my-password"
login = "user.name"
}
resource "grafana_dashboard" "dashboard" {
config_json = jsonencode({
"title" : "My Dashboard",
"uid" : "my-dashboard-uid"
})
}
resource "grafana_dashboard_permission_item" "role" {
dashboard_uid = grafana_dashboard.dashboard.uid
role = "Viewer"
permission = "View"
}
resource "grafana_dashboard_permission_item" "user" {
dashboard_uid = grafana_dashboard.dashboard.uid
user = grafana_user.user.id
permission = "Admin"
}
resource "grafana_dashboard_permission_item" "team" {
dashboard_uid = grafana_dashboard.dashboard.uid
team = grafana_team.team.id
permission = "Edit"
}
dashboard_uid
(String) The UID of the dashboard.permission
(String) the permission to be assignedorg_id
(String) The Organization ID. If not set, the Org ID defined in the provider block will be used.role
(String) the role onto which the permission is to be assignedteam
(String) the team onto which the permission is to be assigneduser
(String) the user or service account onto which the permission is to be assignedid
(String) The ID of this resource.Import is supported using the following syntax:
terraform import grafana_dashboard_permission_item.name "{{ dashboardUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
terraform import grafana_dashboard_permission_item.name "{{ orgID }}:{{ dashboardUID }}:{{ type (role, team, or user) }}:{{ identifier }}"