DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Explicitly defining PowerShell resources doesn't allow for delete

Open Gijsreyn opened this issue 1 month ago • 0 comments

Prerequisites

  • [x] Write a descriptive title.
  • [x] Make sure you are able to repro it on the latest version
  • [x] Search the existing issues.

Summary

After the following pull request, I can create a configuration document like:

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Basic workspace group
  type: DatabricksDsc/DatabricksAccountServicePrincipal
  properties: 
     Name: 'my-user'
     _exist: false

However, trying to execute the above throws an error: Resource 'DatabricksDsc/DatabricksAccountServicePrincipal' does not support deleteand does not handle_exist as false.

Whenever I wrap it around Microsoft.DSC/PowerShell , this doesn't happen because the adapter has the implementsPreTest set.

Steps to reproduce

Run the above configuration document

Expected behavior

The resource runs and deletes the service principal

Actual behavior

Resource 'DatabricksDsc/DatabricksAccountServicePrincipal' does not support `delete` and does not handle `_exist` as false

Error details


Environment data

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.2.0-preview.8

Visuals

No response

Gijsreyn avatar Nov 26 '25 02:11 Gijsreyn