keenauth_role

La ressource keenauth_role gère un rôle de l'environnement et l'ensemble complet de ses autorisations. Un rôle qui appartient à une seule organisation est une ressource différente, keenauth_organization_role. La source de données keenauth_role lit un rôle par id ou key.

resource "keenauth_permission" "invoices_read" {
  api_id = "api_01j9zq3v8c5m2x7k4t6r1n0b3d"
  value  = "invoices:read"
}

resource "keenauth_role" "billing" {
  key         = "billing"
  name        = "Billing"
  description = "Invoices and payment methods."

  permission_ids = [keenauth_permission.invoices_read.id]
}

data "keenauth_role" "billing" {
  key = "billing"
}

Cycle de vie

Importation

Importez par clé ou par identifiant :

tofu import keenauth_role.billing billing
tofu import keenauth_role.billing rol_01j9zq3v8c5m2x7k4t6r1n0b3d