Comments (3)
Ideally, this would be supported for both DSC v2 PowerShell Class based resources and DSC v3 resources.
from dsc.
A few approaches spring to mind for DSCv3 resources, all in the resource manifest:
- Add an
elevation
property to the top-level of the manifest, with the enum valuesdefault
,prohibited
,required
, andself
- 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 forget
,test
, andset
operations. If the property isn't specified, the resource is interpreted as having a value ofdefault
. - Add the same property to the command/operation sections of the manifest. In this case, the property applies only to that operation. Setting
elevation
forset
has no effect on whether elevation is required or prohibited forget
.
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.
Fixed via #351
from dsc.
Related Issues (20)
- Enable `SkipGroup` reusing dsc.exe HOT 1
- `RunCommand` resource HOT 5
- Add `Methods` to table view for `dsc resource list` HOT 4
- Rename `providers` term to be `adapters` HOT 2
- `DSCConfigRoot` should be absolute and not relative
- Standardize built-in resource namespaces HOT 1
- Signing resource manifests
- Support for Credentials HOT 1
- DSC resource table change for `methods`
- Update `dsc resource list` output schema to include `methods` HOT 3
- `RebootRequired` resource
- Rename `DSCConfigRoot` environment variable to `DSC_CONFIG_ROOT` and handle existing value
- Error when the variable referenced with `envvar()` doesn't exist
- Tracing and progress get interleaved
- PowerShell Adapter changes
- Synthesize manifest for PS resources so that version, methods get populated HOT 1
- when using `-p` to pass a file `~` cannot be used in PowerShell HOT 2
- DSC Resource declared in `yaml` not discovered if `schema:` is present and not working if `schema:` is absent. HOT 1
- Adapters in resource path get evaluated twice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dsc.