DSC icon indicating copy to clipboard operation
DSC copied to clipboard

allow specifying version, signature, hash of resource

Open SteveL-MSFT opened this issue 4 months ago • 3 comments

Summary of the new feature / enhancement

To ensure a specific version (range?) is used or identify of the resource as well as supporting use of different versions of the same resource, we should leverage metadata property to allow describing resource requirements like version (range), hash, etc...

Proposed technical implementation details (optional)

Similar to the execution context for metadata, we can just have metadata at the resource level:

resources:
- name: version1
  type: Test/MyResource
  metadata:
    Microsoft.DSC:
      resourceRequirements:
        version: "[1.0.0,2.0.0)" # nuget version range syntax indicating 1.x.x but not including 2.0.0
  properties:
    a: 1
    b: 2

The Microsoft.DSC namespace avoids collisions, but makes it more nested. Adapters would need to opt-in to support this.

SteveL-MSFT avatar Apr 05 '24 17:04 SteveL-MSFT