-
Notifications
You must be signed in to change notification settings - Fork 472
[Documentation] Unified Provider: One provider to manage both workspace and account level resources #5122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ricks into doc-unified-tf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces documentation for the Unified Provider feature, which enables managing workspace-level resources through a single account-level provider configuration, eliminating the need for separate workspace providers.
Key changes:
- Added comprehensive guide explaining unified provider usage and migration
- Updated main documentation with authentication examples
- Added changelog entry
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/index.md | Added authentication section with unified provider example |
| docs/guides/unified-provider.md | New comprehensive guide covering usage, migration, limitations, and issue reporting |
| NEXT_CHANGELOG.md | Added changelog entry for unified provider documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
mgyucht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main gap is the instruction for migration. Otherwise this is looking pretty good, just a few nits.
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
mgyucht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more feedback!
| ### Block | ||
| ```hcl | ||
| resource "workspace_level_resource" "this" { | ||
| provider_config { | ||
| workspace_id = "12345" | ||
| } | ||
| ... | ||
| } | ||
| ``` | ||
|
|
||
| ### Attribute | ||
| ```hcl | ||
| resource "workspace_level_resource" "this" { | ||
| provider_config = { | ||
| workspace_id = "12345" | ||
| } | ||
| ... | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the subheadings and just add English describing the code blocks.
Use actual resources rather than fake ones.
|
|
||
| To manage a workspace-level resource through the account provider, specify the `provider_config` at the resource level with the `workspace_id` of the workspace the resource belongs to. | ||
|
|
||
| Depending on the internal implementation of the resource or data source, `provider_config` can be either a block or an attribute. For details, please refer to the documentation of the specific resource or data source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With attributes, an = separates the provider_config from its configuration, whereas with blocks, this = is omitted.
| } | ||
| ``` | ||
|
|
||
| **Note:** This feature is being rolled out incrementally. Some resources do not yet support the unified provider. Please check the resource-specific documentation to see if the `provider_config` attribute or block is available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest not to document this change until after non-SDK resources are supported.
| ``` | ||
|
|
||
| Once the workspace is created, create a workspace-level provider. | ||
| ```hcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ``` | |
| Once the workspace is created, create a workspace-level provider. | |
| ```hcl |
| } | ||
| // Use the workspace provider for workspace-level resources | ||
| resource "databricks_workspace_level_resource" "this" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use real resources just for demonstration
| ## FAQ | ||
|
|
||
| * An empty `workspace_id` is not allowed, and `terraform plan` will fail with the error: `"workspace_id string length must be at least 1"`. | ||
| * The `workspace_id` supplied to the resource through `provider_config` must belong to the account for which the provider is configured. If the workspace does not belong to the account, you will receive an error: `"failed to get workspace client, please check the workspace_id provided in the provider_config"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or that the authenticated principal doesn't have permission to call the GetWorkspace API.
|
|
||
| ## Usage | ||
|
|
||
| To manage a workspace-level resource through the account provider, specify the `provider_config` at the resource level with the `workspace_id` of the workspace the resource belongs to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to have the "account admin" permission. (Let's check this with Alex or LRM team.)
| There are some limitations to this feature that we plan to address in the near future: | ||
|
|
||
| 1. Databricks CLI and Azure CLI authentication methods are not currently supported | ||
| 2. Some resources do not yet support the unified provider as the support is rolling out incrementally. Please refer to the documentation for each resource or data source to check if they support the `provider_config` attribute or block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also will go away.
|
|
||
| 1. Databricks CLI and Azure CLI authentication methods are not currently supported | ||
| 2. Some resources do not yet support the unified provider as the support is rolling out incrementally. Please refer to the documentation for each resource or data source to check if they support the `provider_config` attribute or block. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is the right spot to mention the account admin permission restriction?
| } | ||
| // Create a workspace level resource under the workspace above | ||
| resource "databricks_workspace_level_resource" "this" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
…amework resources and data sources (#5115) ## Changes <!-- Summary of your changes that are easy to understand --> Add unified provider support for the following resources: - Quality Monitor - Library - Shares These use types.List to be compatible with SDKv2 Also noticed that we don't have documentation for library resource, added it as well. Main documentation: #5122 ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> Integration tests
Changes
Public BetaWith these, users have sufficient information to start using, migrating to unified provider with examples and how to report issues. We can add more later on.
Tests
N/A