Manages a single permission item for a service account. Conflicts with the "grafana_service_account_permission" resource which manages the entire set of permissions for a service account.
resource "grafana_service_account" "test" {
name = "terraform-sa"
role = "Editor"
is_disabled = false
}
resource "grafana_team" "team" {
name = "Team Name"
}
resource "grafana_user" "user" {
email = "user.name@example.com"
login = "user.name"
password = "my-password"
}
resource "grafana_service_account_permission_item" "on_team" {
service_account_id = grafana_service_account.test.id
team = grafana_team.team.id
permission = "Admin"
}
resource "grafana_service_account_permission_item" "on_user" {
service_account_id = grafana_service_account.test.id
user = grafana_user.user.id
permission = "Admin"
}
permission
(String) the permission to be assignedservice_account_id
(String) The ID of the service account.org_id
(String) The Organization ID. If not set, the Org ID defined in the provider block will be used.team
(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_service_account_permission_item.name "{{ serviceAccountID }}:{{ type (role, team, or user) }}:{{ identifier }}"
terraform import grafana_service_account_permission_item.name "{{ orgID }}:{{ serviceAccountID }}:{{ type (role, team, or user) }}:{{ identifier }}"