GithubHelp home page GithubHelp logo

Comments (3)

denelon avatar denelon commented on May 23, 2024

Ideally, this would be supported for both DSC v2 PowerShell Class based resources and DSC v3 resources.

from dsc.

michaeltlombardi avatar michaeltlombardi commented on May 23, 2024

A few approaches spring to mind for DSCv3 resources, all in the resource manifest:

  1. Add an elevation property to the top-level of the manifest, with the enum values default, prohibited, required, and self - the expectation here is that the resource executes according to this setting, regardless of the operation. So if a resource is defined with "elevation": "required", it must be run elevated for get, test, and set operations. If the property isn't specified, the resource is interpreted as having a value of default.
  2. Add the same property to the command/operation sections of the manifest. In this case, the property applies only to that operation. Setting elevation for set has no effect on whether elevation is required or prohibited for get.

I think it would be possible to support both, but only one in a manifest - if the top-level elevation is set it should be prohibited in the operation properties and vice versa.

I don't see a way to do this for existing PSDSC resources, short of introducing a new attribute (like DscElevation()) or a not-required method, like GetElevationInfo(). It can't be worked backwards into the existing DscResource() attribute as far as I know.

from dsc.

SteveL-MSFT avatar SteveL-MSFT commented on May 23, 2024

Fixed via #351

from dsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.