DatabricksDsc
0.4.0-preview0001
This module contains class-based DSC resources for Databricks
Minimum PowerShell version
5.0
See the version list below for details.
Installation Options
Owners
Copyright
(c) Gijs Reijn. All rights reserved.
Package Details
Author(s)
- Gijs Reijn
Functions
Get-DatabricksUser New-DatabricksUser Remove-DatabricksUser Set-DatabricksUser
DSCResources
DatabricksAccountMetastoreAssignment DatabricksAccountServicePrincipal DatabricksAccountUser DatabricksClusterPolicy DatabricksClusterPolicyPermission DatabricksServicePrincipal DatabricksUser
Dependencies
This module has no dependencies.
Release Notes
## [0.4.0-preview0001] - 2025-11-22
### Added
- Added `DatabricksAccountMetastoreAssignment` resource for managing Unity
Catalog metastore assignments to workspaces
- Manages workspace-to-metastore assignments at the account level
- Key properties: `AccountId`, `WorkspaceId`, and `MetastoreId`
- Supports assignment (create/update via PUT) and unassignment (DELETE)
- Uses account-level API endpoints:
- GET: `/api/2.0/accounts/{account_id}/workspaces/{workspace_id}/metastore`
- POST: `/api/2.0/accounts/{account_id}/workspaces/{workspace_id}/metastores`
- DELETE: `/api/2.0/accounts/{account_id}/workspaces/{workspace_id}/metastores/{metastore_id}`
- Validates AccountId and MetastoreId as GUIDs, WorkspaceId as numeric
- Includes comprehensive unit tests with 32 test cases covering all methods
and scenarios
- Implements Export functionality:
- `GetAllResourcesFromApi()` retrieves all workspace assignments for a
metastore using GET `/api/2.0/accounts/{account_id}/metastores/{metastore_id}/workspaces`
- `CreateExportInstance()` converts API workspace assignment data to
resource instances
- `Export([FilteringInstance])` supports filtering by WorkspaceId
- Requires AccountId and MetastoreId to be set in the filtering instance
- Added localization strings for export operations (DAMA0016-DAMA0019)
- Added 7 unit tests for Export functionality covering all scenarios
- Added `DatabricksAccountResourceBase` intermediate base class for account-level
DSC resources
- Inherits from `DatabricksResourceBase` and provides specialized functionality
for account-level operations
- Introduces `AccountsUrl` property with default value `https://accounts.azuredatabricks.net/`
- Constructor automatically sets `WorkspaceUrl` from `AccountsUrl` for base
class compatibility
- Simplifies configuration for account-level resources by providing sensible
defaults
- Account-level resources (`DatabricksAccountUser`, `DatabricksAccountServicePrincipal`,
`DatabricksAccountMetastoreAssignment`) now inherit from this base class
- Added `_exist` property to all account-level resources
- `DatabricksAccountUser`, `DatabricksAccountServicePrincipal`, and
`DatabricksAccountMetastoreAssignment` now include the `_exist` property
- Defaults to `$true` for proper existence management
- Enables proper handling of resource presence/absence in desired state
- Added configuration examples for `DatabricksAccountMetastoreAssignment` resource
- Example 001: Basic metastore assignment to workspace
- Example 002: Remove metastore assignment from workspace
### Fixed
- Fixed `DatabricksClusterPolicy` resource examples to use hashtable format
for the `Definition` property instead of JSON string
- Updated all three examples (basic, complete, and user limit) to demonstrate
proper hashtable usage with YAML syntax
- Makes examples more readable and easier to maintain
- Fixed `DatabricksAccountMetastoreAssignment` to correctly parse API response
- Updated to handle nested `metastore_assignment` object structure from API
- Checks `$response.metastore_assignment.metastore_id` instead of flat structure
- Updated unit test mocks to match actual API response format
FileList
- DatabricksDsc.nuspec
- DatabricksDsc.psd1
- Modules\DscResource.Common\0.24.4\DscResource.Common.psd1
- DatabricksDsc.psm1
- Modules\DscResource.Common\0.24.4\DscResource.Common.psm1
- Modules\DscResource.Base\1.4.0\DscResource.Base.psm1
- en-US\DatabricksAccountMetastoreAssignment.strings.psd1
- Modules\DscResource.Base\1.4.0\DscResource.Base.psd1
- en-US\DatabricksAccountUser.strings.psd1
- Modules\DscResource.Common\0.24.4\en-US\DscResource.Common-help.xml
- en-US\ClusterPolicyPermissionTypes.strings.psd1
- Modules\DscResource.Common\0.24.4\en-US\about_DscResource.Common.help.txt
- en-US\about_DatabricksDsc.help.txt
- Modules\DscResource.Common\0.24.4\en-US\DscResource.Common.strings.psd1
- en-US\DatabricksClusterPolicyPermission.strings.psd1
- Modules\DscResource.Base\1.4.0\en-US\ResourceBase.strings.psd1
- en-US\DatabricksServicePrincipal.strings.psd1
- Modules\DscResource.Base\1.4.0\en-US\about_DscResource.Base.help.txt
- en-US\DatabricksAccountResourceBase.strings.psd1
- Modules\DscResource.Base\1.4.0\en-US\DscResource.Base.strings.psd1
- en-US\DatabricksClusterPolicy.strings.psd1
- Modules\DscResource.Base\1.4.0\Modules\DscResource.Common\0.23.0\DscResource.Common.psd1
- en-US\DatabricksResourceBase.strings.psd1
- Modules\DscResource.Base\1.4.0\Modules\DscResource.Common\0.23.0\DscResource.Common.psm1
- en-US\DatabricksUser.strings.psd1
- Modules\DscResource.Base\1.4.0\Modules\DscResource.Common\0.23.0\en-US\DscResource.Common-help.xml
- en-US\UserTypes.strings.psd1
- Modules\DscResource.Base\1.4.0\Modules\DscResource.Common\0.23.0\en-US\about_DscResource.Common.help.txt
- en-US\DatabricksDsc.strings.psd1
- Modules\DscResource.Base\1.4.0\Modules\DscResource.Common\0.23.0\en-US\DscResource.Common.strings.psd1
- en-US\DatabricksAccountServicePrincipal.strings.psd1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.5.0 | 47 | 11/27/2025 |
| 0.5.0-previe... | 3 | 11/27/2025 |
| 0.4.2 | 55 | 11/26/2025 |
| 0.4.2-previe... | 3 | 11/25/2025 |
| 0.4.1 | 74 | 11/23/2025 |
| 0.4.0-previe... | 3 | 11/23/2025 |
| 0.4.0-previe... (current version) | 3 | 11/22/2025 |
| 0.3.0 | 4 | 11/21/2025 |
| 0.3.0-previe... | 3 | 11/21/2025 |
| 0.2.1 | 6 | 11/19/2025 |
| 0.2.0-previe... | 5 | 11/19/2025 |