Consider how we might offer resource code as an ARM resource
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
The intention would be for DSC resources to be published as an ARM resource. The motivation for such as solution would be to eliminate the machine configuration dependency on external artifacts, by modeling resources in ARM and writing them as a control-plane API.
This might be workable, based on Run Command resources. In that model, the script reference can either be in-line code or an external file.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/run-command-managed#rest-api
Proposed technical implementation details (optional)
For very simple one-liners we could consider passing in the command syntax with the parameter input. This probably would be most useful in audit scenarios. Set scripts are more often complicated but Get scripts can sometimes be quite short.
If we followed the Run Command schema, this is what the json might look like.
{
"source": {
"get": "$service = get-service -name $env:Name; @{Name = $service.Name; Status = $service.status}"
},
"parameters": {
"Status": "Running",
"Name": "bits"
}
}
So an end-to-end automation command would look something like this.
{"source": {"get": "$service = get-service -name $env:Name; @{Name = $service.Name; Status = $service.status}"},"parameters": {"Status": "Running","Name": "bits"}} | dsc resource
This would require the machine configuration service team to create a new resource type under Microsoft.GuestConfiguration. Then a configuration in JSON format in ARM could reference the script code as a dependency.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked Azure Run Command REST API model and the machine configuration service/resource-type dependency described in the issue. No repository files or tests are named; completion criteria would need to be agreed for an ARM resource schema, inline script handling, and an end-to-end dsc resource flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- api, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100