From 853c1153e0ee53b981f452c43868e7de837e65b4 Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Mon, 14 Oct 2024 09:29:14 +0200 Subject: [PATCH] Add an example of permissions for alerts --- docs/resources/alert.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/resources/alert.md b/docs/resources/alert.md index f15bdaf11..5fbf14500 100644 --- a/docs/resources/alert.md +++ b/docs/resources/alert.md @@ -179,6 +179,20 @@ resource "databricks_permissions" "alert_usage" { } ``` +## Access Control + +[databricks_permissions](permissions.md#sql-alert-usage) can control which groups or individual users can *Manage*, *Edit*, *Run* or *View* individual alerts. + +```hcl +resource "databricks_permissions" "alert_usage" { + sql_alert_id = databricks_alert.alert.id + access_control { + group_name = "users" + permission_level = "CAN_RUN" + } +} +``` + ## Import This resource can be imported using alert ID: