Desired state configuration for environments
Design and implement desired state configuration
The objective names four technologies. Know what each one is, and which are current.
| Technology | Layer | Status |
|---|---|---|
| ARM templates | Primary target: Azure resource state | Current — JSON |
| Bicep | Primary target: Azure resource state | Current — concise DSL converted to ARM |
| Azure Automation State Configuration | In-guest (OS) | Retires 30 Sep 2027 |
| Azure Machine Configuration | In-guest (OS) | Current — the successor |
Bicep and ARM are the same deployment engine
Bicep is authored more concisely and converted to ARM JSON; both are submitted to Azure Resource Manager. Choosing Bicep is an authoring decision, not a change of deployment model — which is why a scenario about "simplifying template authoring without changing the deployment mechanism" points at Bicep.
In-guest is a different layer
ARM and Bicep primarily declare Azure resources and properties. They can also deploy VM extensions or Microsoft.GuestConfiguration/guestConfigurationAssignments extension resources that act in the guest. Machine Configuration—not the template language—owns ongoing audit and convergence of guest OS and application state.
Implement Machine Configuration
- Define the guest state with PowerShell Desired State Configuration (PSDSC).
- Create and test a custom package, then publish and sign the package artifact.
- Assign a built-in or custom configuration directly or through Azure Policy.
- Choose Audit, Apply and Monitor, or Apply and Autocorrect for the intended enforcement behavior.
- Review compliance and remediate according to the assignment mode.
Bicep can compose the layers by declaring the guest assignment as an extension resource:
resource assignment 'Microsoft.GuestConfiguration/guestConfigurationAssignments@2024-04-05' = {
name: assignmentName
scope: vm
properties: {
guestConfiguration: { name: packageName }
}
}Validate versus what-if
Validation is more than parsing: static validation checks template structure, parameters, expressions, and consistency, while provider preflight can check feasibility. What-if includes preflight and adds a predicted resource/property diff without applying it. A Delete prediction is tied to complete-mode semantics and supported deletion behavior.
The retirement, restated
Azure Automation State Configuration will be retired on 30 September 2027; transition to Azure Machine Configuration. Machine Configuration combines features of the DSC Extension and Automation State Configuration, and supports hybrid machines through Arc-enabled servers.
Both still appear in the objective, so both are examinable — but only one is where new work should go.
Primary sources
- https://learn.microsoft.com/en-us/azure/governance/machine-configuration/overview/01-overview-concepts
- https://learn.microsoft.com/en-us/azure/automation/automation-dsc-overview
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/overview
- https://learn.microsoft.com/en-us/azure/governance/machine-configuration/how-to/assign-configuration/bicep
- https://learn.microsoft.com/en-us/azure/governance/machine-configuration/how-to/develop-custom-package/overview
- https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-what-if
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-preflight