Skip to content

Commit df48d56

Browse files
tanmay-dbalexott
andauthored
[Documentation] Added HCL provider example for WIF authentication (#4799)
## Changes <!-- Summary of your changes that are easy to understand --> - Add HCL example for WIF authentication. - Make `NEXT_CHANGELOG.md` consistent, currently it's not indented properly. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> N/A - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework --------- Co-authored-by: Alex Ott <[email protected]>
1 parent bdc50ea commit df48d56

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
### Breaking Changes
66

77
### New Features and Improvements
8-
* Added `time_rotating` argument to `databricks_service_principal_secret` to enable secret rotation ([#4789](https://github.com/databricks/terraform-provider-databricks/pull/4789)).
9-
108

9+
* Added `time_rotating` argument to `databricks_service_principal_secret` to enable secret rotation ([#4789](https://github.com/databricks/terraform-provider-databricks/pull/4789)).
1110
* Add AWS support for `databricks_mws_ncc_private_endpoint_rule` ([#4804](https://github.com/databricks/terraform-provider-databricks/pull/4804)).
1211
* Added `key` argument to `databricks_jobs` data source to enable mapping by job ID and allow duplicate job names ([#4796](https://github.com/databricks/terraform-provider-databricks/pull/4796)).
1312

1413
### Bug Fixes
1514

1615
### Documentation
1716

17+
* Added HCL provider example for WIF authentication ([#4799](https://github.com/databricks/terraform-provider-databricks/pull/4799))
1818
* Added link to Workload Identity Federation page ([#4786](https://github.com/databricks/terraform-provider-databricks/pull/4786)).
1919
* auto `zone_id` can only be used for fleet node types in `databricks_instance_pool` resource ([#4782](https://github.com/databricks/terraform-provider-databricks/pull/4782)).
2020
* Document `tags` attribute in `databricks_pipeline` resource ([#4783](https://github.com/databricks/terraform-provider-databricks/pull/4783)).

docs/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,32 @@ provider "databricks" {
277277

278278
Workload Identity Federation can be used to authenticate Databricks from automated workflows. This is done through the tokens issued by the automation environment. For more details on environment variables regarding the specific environments, please see: https://docs.databricks.com/aws/en/dev-tools/auth/oauth-federation-provider.
279279

280+
To create resources at both the account and workspace levels, you can create two providers as shown below:
281+
282+
Workspace level provider:
283+
```hcl
284+
provider "databricks" {
285+
alias = "workspace"
286+
auth_type = "env-oidc"
287+
host = var.workspace_host
288+
client_id = var.client_id
289+
}
290+
```
291+
292+
Account level provider:
293+
```hcl
294+
provider "databricks" {
295+
alias = "account"
296+
auth_type = "env-oidc"
297+
host = var.account_host
298+
client_id = var.client_id
299+
account_id = var.account_id
300+
}
301+
```
302+
303+
Note: `auth_type` for Github Actions would be "github-oidc". For more details, please see the document linked above.
304+
305+
280306
## Special configurations for Azure
281307

282308
The below Azure authentication options are supported at both the account and workspace levels. The provider works with [Azure CLI authentication](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest) to facilitate local development workflows, though for automated scenarios, managed identity or service principal auth is recommended (and specification of `azure_use_msi`, `azure_client_id`, `azure_client_secret` and `azure_tenant_id` parameters).

0 commit comments

Comments
 (0)