Skip to content

Commit 15181ad

Browse files
authored
Added Azure example for sql_global_config (#1028)
1 parent 22aea9a commit 15181ad

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/resources/sql_global_config.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This resource configures the security policy, [databricks_instance_profile](inst
77

88
## Example usage
99

10+
### AWS example
11+
1012
```hcl
1113
resource "databricks_sql_global_config" "this" {
1214
security_policy = "DATA_ACCESS_CONTROL"
@@ -17,13 +19,31 @@ resource "databricks_sql_global_config" "this" {
1719
}
1820
```
1921

22+
### Azure example
23+
24+
For Azure you should use the `data_access_config` to provide the service principal configuration. You can use the Databricks SQL Admin Console UI to help you generate the right configuration values.
25+
26+
```hcl
27+
resource "databricks_sql_global_config" "this" {
28+
security_policy = "DATA_ACCESS_CONTROL"
29+
data_access_config = {
30+
"spark.hadoop.fs.azure.account.auth.type" : "OAuth",
31+
"spark.hadoop.fs.azure.account.oauth.provider.type" : "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
32+
"spark.hadoop.fs.azure.account.oauth2.client.id" : "${var.tenant_id}",
33+
"spark.hadoop.fs.azure.account.oauth2.client.secret" : "{{secrets/${local.secret_scope}/${local.secret_key}}}",
34+
"spark.hadoop.fs.azure.account.oauth2.client.endpoint" : "https://login.microsoftonline.com/${var.tenant_id}/oauth2/token"
35+
}
36+
}
37+
```
38+
39+
2040
## Argument Reference
2141

2242
The following arguments are supported (see [documentation](https://docs.databricks.com/sql/api/sql-endpoints.html#global-edit) for more details):
2343

2444
* `security_policy` (Optional, String) - The policy for controlling access to datasets. Default value: `DATA_ACCESS_CONTROL`, consult documentation for list of possible values
2545
* `data_access_config` (Optional, Map) - data access configuration for [databricks_sql_endpoint](sql_endpoint.md), such as configuration for an external Hive metastore, Hadoop Filesystem configuration, etc. Please note that the list of supported configuration properties is limited, so refer to the [documentation](https://docs.databricks.com/sql/admin/data-access-configuration.html#supported-properties) for a full list. Apply will fail if you're specifying not permitted configuration.
26-
* `instance_profile_arn` (Optional, String) - [databricks_instance_profile](instance_profile.md) used to access storage from [databricks_sql_endpoint](sql_endpoint.md). Please note that this parameter is only for AWS, and will generate an error if used on other clouds.
46+
* `instance_profile_arn` (Optional, String) - [databricks_instance_profile](instance_profile.md) used to access storage from [databricks_sql_endpoint](sql_endpoint.md). Please note that this parameter is only for AWS, and will generate an error if used on other clouds.
2747

2848
## Import
2949

0 commit comments

Comments
 (0)