Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Desired State · Configuration Management

Direct answer

Desired state is the declared end configuration a system should have, such as package installed or service running. The configuration management tool works out and applies the steps to reach it.

When to use this

Use this when declaring the end state systems should have.

First 30 seconds

1. Desired state is declared in code.

2. Single source of truth.

3. No manual edits on hosts.

4. Changes reviewed.

5. Environments as data.

Operational verification

git → desired state → enforced on hosts

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Microsoft DSC 3.0/current
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformMicrosoft DSC 3.0/current · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when declaring the end state systems should have.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Verification should distinguish 'the declaration is valid', 'the resource reports drift', and 'the target now conforms'. Start with schema/configuration validation, then use the configuration manager's test/read operation to compare desired and current state without mutation. Record which resources/properties are out of state and whether the engine can actually observe them. After enforcement, repeat the read/test and also verify the consumer-visible outcome independently—for example service configuration, file content, package version, API setting or application behavior. A second idempotency-oriented run should report no unexpected change when the system is already converged. If the manager reports compliant but the service remains broken, stop treating desired-state convergence as evidence of service health and continue at the dependent application/runtime boundary.

Step 2 Common mistakes Narrow the fault
  • Desired state not version-controlled.
Step 3 Where it fails Narrow the fault

The critical boundaries are declaration validity, resource/provider interpretation, current-state observation, convergence mutation and consumer outcome. A schema-valid document can reference an unavailable resource; a resource can misread or normalize state; convergence can fail from permissions or platform restrictions; and a fully converged resource can still be operationally unhealthy. Avoid 'fixing drift' by broadening ownership until you know which property is authoritative. Likewise, do not change desired intent merely to make a broken current state appear compliant. Show the earliest failing step with a read-only test, then change only the responsible layer. Preserve the desired revision and before/after resource observations, and re-run both the configuration-manager test and the original service-facing verification after remediation.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Declare what the end state is, not the steps.
  • The tool decides how to reach it.
  • Desired state is versioned and reviewed.
Key checks
  • Desired configuration in git — source
  • ansible-playbook site.yml --check — compare
  • Reviewed merge requests — change control
ReferenceWhy it matters1 section · depth on demand

In depth

In configuration management, desired state is the set of settings each host or device should have, expressed as roles, variables and templates. The tool applies it and reports whether each resource was already correct, changed, or failed.

- hosts: ntp_clients
  roles:
    - role: chrony
      vars:
        chrony_servers: [10.0.0.10, 10.0.0.11]
Result per resourceMeaning
okAlready in desired state
changedTool corrected it
failedCould not reach desired state
skippedCondition not met

A run where most resources are "ok" is healthy; repeated "changed" on the same resource means something keeps undoing it.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

In configuration management, desired state is the declarative target against which a manager evaluates observed resource state. The important model is not simply 'a configuration file': it is desired declaration → resource/schema interpretation → current-state read → comparison → convergence action → post-change read. A mature configuration engine delegates resource-specific behavior to providers/resources that know how to read and set a system component. Dependencies and ordering can affect when a resource is safe to converge, while partial ownership determines which attributes the configuration manager is allowed to enforce. Desired state should therefore be scoped to explicitly managed properties; values outside that ownership boundary may be intentionally left to another controller. Convergence also does not guarantee business-service health: a resource can match its declared configuration while an application dependency, credential, or network path remains broken.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Keep desired-state declarations versioned, reviewed and reproducible independently of the controller that enforces them. Define the schema/version and resource/provider versions required to interpret the declaration, separate secrets from ordinary configuration, and avoid embedding current-state observations into the desired-state document unless they are intentionally captured inputs. Changes should move through validation/test, controlled apply, and independent read-back, with a clear rollback or forward-fix strategy when convergence changes behavior. When multiple systems manage the same target, document ownership of each property to prevent reconciliation loops. A desired-state repository is durable intent; cached inventory, controller state and live resource values are derived observations. Regularly test that a fresh controller can interpret the declaration without relying on local operator state or undeclared plugins.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docMicrosoft DSC 3.0/current 3.0/current

Authoritative/upstream documentation reviewed for bounded claims in Configuration Management > Desired State. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/dsc/overview?view=dsc-3.0 · confidence 94%
Embedded reference data

Quick lookup tables

Configuration Management → Desired State · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for Configuration Management → Desired State.

LayerConfiguration Management → Desired State operational reference
Context identityMicrosoft DSC 3.0/current + exact revision/input/target identity
Persistent intentVersioned contract/configuration with explicit ownership and prerequisites
VerificationValidate inputs/read current state → exercise bounded operation → independent target read-back
Output contractPreserve structured status/IDs/properties before human formatting
Failure boundarySeparate source/input/engine/controller execution from downstream target outcome
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Desired-state tooling commonly produces structured per-resource results: resource identity, before/current values, desired values, changed/in-desired-state flags, diagnostics and errors. Preserve these objects or machine-readable results rather than only colored console summaries. A 'test passed' result shows the resource's configured comparison logic for the managed properties, but it does not show unmanaged properties, external dependencies or end-user behavior. If the engine normalizes values—ordering, default fields, paths, casing—distinguish normalization-only differences from actual drift. During change review, summarize which properties will be converged and which remain outside ownership. For troubleshooting, retain the exact declaration revision, resource/provider version and observed result so later runs can explain whether a difference came from intent, implementation or the target itself.

Confirmation

Confirm action

Continue?