keenauth_role

keenauth_role リソースは、環境のロールとその権限セット全体を管理します。1 つの組織に属するロールは別のリソース keenauth_organization_role です。keenauth_role データソースは、id または 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"
}

ライフサイクル

インポート

key または ID でインポートします。

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