You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/obo_token.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,9 @@ This resource creates [On-Behalf-Of tokens](https://docs.databricks.com/administ
7
7
8
8
## Example Usage
9
9
10
-
Creating a token for a narrowly-scoped service principal, that would be the only one (besides admins) allowed to use PAT token in this given workspace, keeping your automated deployment highly secure. Keep in mind that a given declaration of `databricks_permissions.token_usage` would remove permissions to use PAT tokens from the `users` group.
10
+
Creating a token for a narrowly-scoped service principal, that would be the only one (besides admins) allowed to use PAT token in this given workspace, keeping your automated deployment highly secure.
11
+
12
+
-> **Note** A given declaration of `databricks_permissions.token_usage` would OVERWRITE permissions to use PAT tokens from any existing groups with token usage permissions such as the `users` group. To avoid this, be sure to include any desired groups in additional `access_control` blocks in the Terraform configuration file.
Copy file name to clipboardExpand all lines: docs/resources/permissions.md
+43-8Lines changed: 43 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ subcategory: "Security"
4
4
5
5
# databricks_permissions Resource
6
6
7
-
This resource allows you to generically manage [access control](https://docs.databricks.com/security/access-control/index.html) in Databricks workspace. It would guarantee that only _admins_, _authenticated principal_ and those declared within `access_control` blocks would have specified access. It is not possible to remove management rights from _admins_ group.
7
+
This resource allows you to generically manage [access control](https://docs.databricks.com/security/access-control/index.html) in Databricks workspace. It would guarantee that only _admins_, _authenticated principal_ and those declared within `access_control` blocks would have specified access. It is not possible to remove management rights from _admins_ group.
8
+
9
+
-> **Note** Configuring this resource for an object will **OVERWRITE** any existing permissions of the same type unless imported, and changes made outside of Terraform will be reset unless the changes are also reflected in the configuration.
8
10
9
11
-> **Note** It is not possible to lower permissions for `admins` or your own user anywhere from `CAN_MANAGE` level, so Databricks Terraform Provider [removes](https://github.com/databricks/terraform-provider-databricks/blob/master/access/resource_permissions.go#L261-L271) those `access_control` blocks automatically.
10
12
@@ -669,21 +671,31 @@ General Permissions API does not apply to access control for tables and they hav
669
671
Initially in Unity Catalog all users have no access to data, which has to be later assigned through [databricks_grants](grants.md) resource.
670
672
671
673
## Argument Reference
674
+
One type argument and at least one access control block argument are required.
672
675
673
-
Exactly one of the following attributes is required:
676
+
### Type Argument
677
+
Exactly one of the following arguments is required:
674
678
675
679
-`cluster_id` - [cluster](cluster.md) id
680
+
-`cluster_policy_id` - [cluster policy](cluster_policy.md) id
681
+
-`instance_pool_id` - [instance pool](instance_pool.md) id
676
682
-`job_id` - [job](job.md) id
677
-
-`directory_id` - [directory](notebook.md) id
678
-
-`directory_path` - path of directory
683
+
-`pipeline_id` - [pipeline](pipeline.md) id
679
684
-`notebook_id` - ID of [notebook](notebook.md) within workspace
680
685
-`notebook_path` - path of notebook
686
+
-`directory_id` - [directory](notebook.md) id
687
+
-`directory_path` - path of directory
681
688
-`repo_id` - [repo](repo.md) id
682
689
-`repo_path` - path of databricks repo directory(`/Repos/<username>/...`)
683
-
-`cluster_policy_id` - [cluster policy](cluster_policy.md) id
684
-
-`instance_pool_id` - [instance pool](instance_pool.md) id
690
+
-`experiment_id` - [MLflow experiment](mlflow_experiment.md) id
691
+
-`registered_model_id` - [MLflow registered model](mlflow_model.md) id
685
692
-`authorization` - either [`tokens`](https://docs.databricks.com/administration-guide/access-control/tokens.html) or [`passwords`](https://docs.databricks.com/administration-guide/users-groups/single-sign-on/index.html#configure-password-permission).
693
+
-`sql_endpoint_id` - [SQL endpoint](sql_endpoint.md) id
694
+
-`sql_dashboard_id` - [SQL dashboard](sql_dashboard.md) id
695
+
-`sql_query_id` - [SQL query](sql_query.md) id
696
+
-`sql_alert_id` - [SQL alert](https://docs.databricks.com/sql/user/security/access-control/alert-acl.html) id
686
697
698
+
### Access Control Argument
687
699
One or more `access_control` blocks are required to actually set the permission levels:
688
700
689
701
```hcl
@@ -693,13 +705,13 @@ access_control {
693
705
}
694
706
```
695
707
696
-
Attributes are:
708
+
Arguments for the `access_control` block are:
697
709
698
710
-> **Note** It is not possible to lower permissions for `admins` or your own user anywhere from `CAN_MANAGE` level, so Databricks Terraform Provider [removes](https://github.com/databricks/terraform-provider-databricks/blob/master/access/resource_permissions.go#L261-L271) those `access_control` blocks automatically.
699
711
700
712
-`permission_level` - (Required) permission level according to specific resource. See examples above for the reference.
701
713
702
-
Exactly one of the below attributes is required:
714
+
Exactly one of the below arguments is required:
703
715
-`user_name` - (Optional) name of the [user](user.md).
704
716
-`service_principal_name` - (Optional) Application ID of the [service_principal](service_principal.md#application_id).
705
717
-`group_name` - (Optional) name of the [group](group.md). We recommend setting permissions on groups.
@@ -718,3 +730,26 @@ The resource permissions can be imported using the object id
0 commit comments