Skip to content

Commit c6f6f77

Browse files
alexottnkvuong
andauthored
[Doc] Unify/reorganize notes in docs for resources/data sources (#4657)
## Changes <!-- Summary of your changes that are easy to understand --> Changes include: * Remove not necessary `**Note**` in `->`, etc. * Put notes about account or workspace level provider after the first paragraph, so it's easier to understand what resource/data source is doing, and then read the note. * Added missing notes about account or workspace level provider * Removed repeated notes about `authentication is not configured for provider errors` that is more about troubleshooting than about specific resource/data source. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [x] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework --------- Co-authored-by: vuong-nguyen <[email protected]>
1 parent 4720882 commit c6f6f77

File tree

154 files changed

+333
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+333
-239
lines changed

NEXT_CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Documentation
1212

13+
* Unify/reorganize notes in docs for resources/data sources ([#4657](https://github.com/databricks/terraform-provider-databricks/pull/4657))
14+
1315
### Exporter
1416

1517
### Internal Changes

docs/data-sources/app.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ subcategory: "Apps"
33
---
44
# databricks_app Data Source
55

6+
-> This data source can only be used with a workspace-level provider!
7+
68
-> This feature is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html).
79

810
[Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.

docs/data-sources/apps.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ subcategory: "Apps"
33
---
44
# databricks_apps Data Source
55

6+
-> This data source can only be used with a workspace-level provider!
7+
68
-> This feature is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html).
79

810
[Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.

docs/data-sources/aws_assume_role_policy.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ subcategory: "Deployment"
66

77
This data source constructs necessary AWS STS assume role policy for you.
88

9+
-> This data source can be used with an account or workspace-level provider.
10+
911
## Example Usage
1012

1113
End-to-end example of provisioning Cross-account IAM role with [databricks_mws_credentials](../resources/mws_credentials.md) and [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role):

docs/data-sources/aws_bucket_policy.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ subcategory: "Deployment"
55

66
This datasource configures a simple access policy for AWS S3 buckets, so that Databricks can access data in it.
77

8+
-> This data source can be used with an account or workspace-level provider.
9+
810
## Example Usage
911

1012
```hcl

docs/data-sources/aws_crossaccount_policy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Deployment"
33
---
44
# databricks_aws_crossaccount_policy Data Source
55

6-
-> **Note** This data source can only be used with an account-level provider!
7-
86
This data source constructs necessary AWS cross-account policy for you, which is based on [official documentation](https://docs.databricks.com/administration-guide/account-api/iam-role.html#language-Your%C2%A0VPC,%C2%A0default).
97

8+
-> This data source can be used with an account or workspace-level provider.
9+
1010
## Example Usage
1111

1212
For more detailed usage please see [databricks_aws_assume_role_policy](aws_assume_role_policy.md) or [databricks_aws_s3_mount](../resources/mount.md) pages.

docs/data-sources/aws_unity_catalog_assume_role_policy.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ subcategory: "Deployment"
33
---
44
# databricks_aws_unity_catalog_assume_role_policy Data Source
55

6-
-> **Note** This resource has an evolving API, which may change in future versions of the provider. Please always consult [latest documentation](https://docs.databricks.com/data-governance/unity-catalog/get-started.html#configure-a-storage-bucket-and-iam-role-in-aws) in case of any questions.
7-
86
This data source constructs the necessary AWS Unity Catalog assume role policy for you.
97

8+
-> This data source can be used with an account or workspace-level provider.
9+
10+
-> This data source has an evolving API, which may change in future versions of the provider. Please always consult [latest documentation](https://docs.databricks.com/data-governance/unity-catalog/get-started.html#configure-a-storage-bucket-and-iam-role-in-aws) in case of any questions.
11+
1012
## Example Usage
1113

1214
```hcl

docs/data-sources/aws_unity_catalog_policy.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ subcategory: "Deployment"
33
---
44
# databricks_aws_unity_catalog_policy Data Source
55

6-
-> **Note** This resource has an evolving API, which may change in future versions of the provider. Please always consult [latest documentation](https://docs.databricks.com/data-governance/unity-catalog/get-started.html#configure-a-storage-bucket-and-iam-role-in-aws) in case of any questions.
7-
86
This data source constructs the necessary AWS Unity Catalog policy for you.
97

8+
-> This data source can be used with an account or workspace-level provider.
9+
10+
-> This data source has an evolving API, which may change in future versions of the provider. Please always consult [latest documentation](https://docs.databricks.com/data-governance/unity-catalog/get-started.html#configure-a-storage-bucket-and-iam-role-in-aws) in case of any questions.
11+
1012
## Example Usage
1113

1214
```hcl

docs/data-sources/budget_policies.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
subcategory: "FinOps"
33
---
44
# databricks_budget_policies Data Source
5-
This data source can be used to fetch the list of budget policies.
65

7-
-> **Note** This data source can only be used with an account-level provider!
6+
This data source can be used to fetch the list of budget policies.
87

8+
-> This data source can only be used with an account-level provider!
99

1010
## Example Usage
1111

@@ -26,4 +26,4 @@ data "databricks_budget_policies" "all" {
2626

2727
Data source exposes the following attributes:
2828

29-
- `budget_policies` - The list of budget policy.
29+
- `budget_policies` - The list of budget policy.

docs/data-sources/budget_policy.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
subcategory: "FinOps"
33
---
44
# databricks_budget_policy Data Source
5+
56
This data source can be used to get a single budget policy.
67

7-
-> **Note** This data source can only be used with an account-level provider!
8+
-> This data source can only be used with an account-level provider!
89

910
## Example Usage
1011

@@ -27,4 +28,4 @@ Data source allows you to get a budget policy by the following attribute
2728
Data source exposes the following attributes:
2829

2930
- `policy_id` - The id of the budget policy.
30-
- `policy_name` - The name of the budget policy.
31+
- `policy_name` - The name of the budget policy.

docs/data-sources/catalog.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ subcategory: "Unity Catalog"
33
---
44
# databricks_catalog Data Source
55

6-
-> **Note** This data source can only be used with a workspace-level provider!
7-
8-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
9-
106
Retrieves details of a specific catalog in Unity Catalog, that were created by Terraform or manually. Use [databricks_catalogs](catalogs.md) to retrieve IDs of multiple catalogs from Unity Catalog
117

8+
-> This data source can only be used with a workspace-level provider!
9+
1210
## Example Usage
1311

1412
Read on a specific catalog `test`:

docs/data-sources/catalogs.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ subcategory: "Unity Catalog"
33
---
44
# databricks_catalogs Data Source
55

6-
-> **Note** This data source can only be used with a workspace-level provider!
7-
8-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
9-
106
Retrieves a list of [databricks_catalog](../resources/catalog.md) ids, that were created by Terraform or manually, so that special handling could be applied.
117

8+
-> This data source can only be used with a workspace-level provider!
9+
1210
## Example Usage
1311

1412
Listing all catalogs:

docs/data-sources/cluster.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Compute"
33
---
44
# databricks_cluster Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
Retrieves information about a [databricks_cluster](../resources/cluster.md) using its id. This could be retrieved programmatically using [databricks_clusters](../data-sources/clusters.md) data source.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
Retrieve attributes of each SQL warehouses in a workspace

docs/data-sources/cluster_policy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ subcategory: "Compute"
44

55
# databricks_cluster_policy Data Source
66

7-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
8-
97
Retrieves information about [databricks_cluster_policy](../resources/cluster_policy.md).
108

9+
-> This data source can only be used with a workspace-level provider!
10+
1111
## Example Usage
1212

1313
Referring to a cluster policy by name:

docs/data-sources/clusters.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Compute"
33
---
44
# databricks_clusters Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
Retrieves a list of [databricks_cluster](../resources/cluster.md#cluster_id) ids, that were created by Terraform or manually, with or without [databricks_cluster_policy](../resources/cluster_policy.md).
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
Retrieve cluster IDs for all clusters:

docs/data-sources/current_config.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ subcategory: "Deployment"
55

66
Retrieves information about the currently configured provider to make a decision, for example, add a dynamic block based on the specific cloud.
77

8+
-> This data source can be used with an account or workspace-level provider.
9+
810
## Example Usage
911

1012
Create cloud-specific [databricks_storage_credential](../resources/storage_credential.md):

docs/data-sources/current_metastore.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ subcategory: "Unity Catalog"
55

66
Retrieves information about metastore attached to a given workspace.
77

8-
-> **Note** This is the workspace-level data source.
9-
10-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) to prevent _authentication is not configured for provider_ errors.
8+
-> This data source can only be used with a workspace-level provider!
119

1210
## Example Usage
1311

docs/data-sources/current_user.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Security"
33
---
44
# databricks_current_user Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
Retrieves information about [databricks_user](../resources/user.md) or [databricks_service_principal](../resources/service_principal.md), that is calling Databricks REST API. Might be useful in applying the same Terraform by different users in the shared workspace for testing purposes.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
Create personalized [databricks_job](../resources/job.md) and [databricks_notebook](../resources/notebook.md):

docs/data-sources/dashboards.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ subcategory: "Workspace"
55

66
This data source allows you to retrieve information about Databricks [Dashboards](https://docs.databricks.com/en/dashboards/index.html).
77

8+
-> This data source can only be used with a workspace-level provider!
9+
810
## Example Usage
911

1012
```hcl

docs/data-sources/dbfs_file.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Storage"
33
---
44
# databricks_dbfs_file Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
This data source allows to get file content from [Databricks File System (DBFS)](https://docs.databricks.com/data/databricks-file-system.html).
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
```hcl

docs/data-sources/dbfs_file_paths.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Storage"
33
---
44
# databricks_dbfs_file_paths Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
This data source allows to get list of file names from get file content from [Databricks File System (DBFS)](https://docs.databricks.com/data/databricks-file-system.html).
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
```hcl

docs/data-sources/directory.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Workspace"
33
---
44
# databricks_directory Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
This data source allows to get information about a directory in a Databricks Workspace.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
```hcl

docs/data-sources/external_location.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Unity Catalog"
33
---
44
# databricks_external_location Data Source
55

6-
-> **Note** This data source can only be used with a workspace-level provider!
7-
86
Retrieves details about a [databricks_external_location](../resources/external_location.md) that were created by Terraform or manually.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
Getting details of an existing external location in the metastore

docs/data-sources/external_locations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Unity Catalog"
33
---
44
# databricks_external_locations Data Source
55

6-
-> **Note** This data source can only be used with a workspace-level provider!
7-
86
Retrieves a list of [databricks_external_location](./external_location.md) objects, that were created by Terraform or manually, so that special handling could be applied.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
List all external locations in the metastore

docs/data-sources/functions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Unity Catalog"
33
---
44
# databricks_functionss Data Source
55

6-
-> This data source can only be used with a workspace-level provider!
7-
86
Retrieves a list of [User-Defined Functions (UDFs) registered in the Unity Catalog](https://docs.databricks.com/en/udf/unity-catalog.html).
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
List all functions defined in a specific schema (`main.default` in this example):

docs/data-sources/group.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Security"
33
---
44
# databricks_group Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
Retrieves information about [databricks_group](../resources/group.md) members, entitlements and instance profiles.
97

8+
-> This data source can be used with an account or workspace-level provider.
9+
1010
## Example Usage
1111

1212
Adding user to administrative group

docs/data-sources/instance_pool.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ subcategory: "Compute"
44

55
# databricks_instance_pool Data Source
66

7-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
8-
97
Retrieves information about [databricks_instance_pool](../resources/instance_pool.md).
108

9+
-> This data source can only be used with a workspace-level provider!
10+
1111
## Example Usage
1212

1313
Referring to an instance pool by name:

docs/data-sources/instance_profiles.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ subcategory: "Deployment"
66

77
Lists all available [databricks_instance_profiles](../resources/instance_profile.md).
88

9+
-> This data source can only be used with a workspace-level provider!
10+
911
## Example Usage
1012

1113
Get all instance profiles:

docs/data-sources/job.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ subcategory: "Compute"
33
---
44
# databricks_job Data Source
55

6-
-> **Note** If you have a fully automated setup with workspaces created by [databricks_mws_workspaces](../resources/mws_workspaces.md) or [azurerm_databricks_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/databricks_workspace), please make sure to add [depends_on attribute](../guides/troubleshooting.md#data-resources-and-authentication-is-not-configured-errors) in order to prevent _default auth: cannot configure default credentials_ errors.
7-
86
Retrieves the settings of [databricks_job](../resources/job.md) by name or by id. Complements the feature of the [databricks_jobs](jobs.md) data source.
97

8+
-> This data source can only be used with a workspace-level provider!
9+
1010
## Example Usage
1111

1212
Getting the existing cluster id of specific [databricks_job](../resources/job.md) by name or by id:

0 commit comments

Comments
 (0)