With DSC v3, you can author command-based DSC Resources in any language. This enables you to manage applications in the programming language you and your team prefer, or in the same language as the application you’re managing.
This tutorial describes how you can implement a DSC Resource in Go to manage an application’s configuration files. While this tutorial creates a resource to manage the fictional TSToy application, the principles apply when you author any command-based resource.
In this tutorial, you learn how to:
- Create a small Go application to use as a DSC Resource.
- Define the properties of the resource.
- Implement
get
andset
commands for the resource. - Write a manifest for the resource.
- Manually test the resource.
Prerequisites #
- Familiarize yourself with the structure of a command-based DSC Resource.
- Read About the TSToy application, install
tstoy
, and add it to yourPATH
. - Go 1.19 or higher
- VS Code with the Go extension