Lesson416 words

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.

TechnologyLayerStatus
ARM templatesPrimary target: Azure resource stateCurrent — JSON
BicepPrimary target: Azure resource stateCurrent — concise DSL converted to ARM
Azure Automation State ConfigurationIn-guest (OS)Retires 30 Sep 2027
Azure Machine ConfigurationIn-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

  1. Define the guest state with PowerShell Desired State Configuration (PSDSC).
  2. Create and test a custom package, then publish and sign the package artifact.
  3. Assign a built-in or custom configuration directly or through Azure Policy.
  4. Choose Audit, Apply and Monitor, or Apply and Autocorrect for the intended enforcement behavior.
  5. Review compliance and remediate according to the assignment mode.

Bicep can compose the layers by declaring the guest assignment as an extension resource:

bicep
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

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free