Skip to content

New adapter interface for resource invocation #931

@SteveL-MSFT

Description

@SteveL-MSFT

Summary of the new feature / enhancement

The current adapter model currently expects adapters to implement the equivalent of dsc config ... where the original motivation was to only create a single hosting process that all the nested resources would execute within. However, there have been several problems from this:

  • implicit use of adapted resources requires the engine to generate a nested config at runtime to pass to the adapter and this incurs another discovery (there's no clean way to resolve this since the nested one is deep in the runtime stack)
  • users are more likely to use adapted resources implicitly than wrap them
  • adapters need to understand and implement config level features

Proposed technical implementation details (optional)

We add a new resource adapter model that can be identified in the resource manifest as:

{
  "kind": "resourceAdapter"
}

This would require these kind of adapters to perform the equivalent as dsc resource .... Benefits:

  • no extra discovery perf penalty when used implicilty
  • process isolation is better for security and reliability reasons
  • simpler for adapters to implement
  • engine can resolve all expressions and pass context to this adapter which can pass to resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions