Skip to content

Calling set with _exist is false does not run deleteΒ #1268

@ThomasNieto

Description

@ThomasNieto

Prerequisites

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

Summary

Resources that support both set and delete does not call the correct operation when _exist is set to false.

I know if I were to create a config doc it would be called correctly but with rapid testing, I just change the payload from creating to deleting by setting the _exist property instead of changing the set to delete.

Steps to reproduce

  1. Create resource with set and delete operations and _exist canonical property.
  2. Call dsc resource set with (@{ _exist = $false} | ConvertTo-Json)

Expected behavior

The resource is deleted

Actual behavior

The resource is not deleted

Error details

Environment data

7.6.0-preview.5

Version

dsc 3.2.0-preview.8

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions