DatabricksDsc

0.4.0-preview0001

This module contains class-based DSC resources for Databricks

Minimum PowerShell version

5.0

This is a prerelease version of DatabricksDsc.
There is a newer prerelease version of this module available.
See the version list below for details.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name DatabricksDsc -RequiredVersion 0.4.0-preview0001 -AllowPrerelease

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name DatabricksDsc -Version 0.4.0-preview0001 -Prerelease

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

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

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
Show less