CURRICULUM PREVIEWRevision 1 · Open for reviewReview the full course
CONNECTING THE PIECES8 min read

Desired State Configuration

Describe the state you want before applying it.

Before you begincache-aside

The idea

Microsoft DSC uses configuration documents to describe resource instances and their desired properties. Resource implementations provide the meaning of get, test, and set. Inspect installed resources and use a disposable lab before changing state. Keep credentials out of versioned documents.

Follow the flow

Make it concrete

This excerpt isolates the concept. Connect it to the booking API as you work through the exercise.

Focused example
text
dsc resource list
dsc config get --file lab.dsc.yaml
dsc config test --file lab.dsc.yaml
# Review the test result before applying:
dsc config set --file lab.dsc.yaml

Decisions that matter

  • Declarative documents improve repeatability when resource behavior is reliable.
  • Resource availability differs by environment and installed version.
  • Application rollback and configuration rollback need separate plans.

Your turn

What must you check before applying a configuration copied from another machine?

Reveal a worked answer

Verify the schema and DSC version, installed resource types and versions, target environment, permissions, and every intended state change. Run get and test in a disposable lab first. A valid document does not imply the changes are safe for a production host.

Keep exploring

One more piece connected.

Mark this lesson complete when you can explain the idea.