Compose DSC configurations

Note

Azure Automation State Configuration will be retired on September 30, 2027, please transition to Azure Machine Configuration by that date. For more information, see the blog post announcement. The Azure Machine Configuration service combines features of DSC Extension, Azure Automation State Configuration, and the most commonly requested features from customer feedback. Azure Machine Configuration also includes hybrid machine support through Arc-enabled servers.

Caution

Azure Automation DSC for Linux has retired on 30 September 2023.

When you need to manage resource with more than a single desired state configuration (DSC), the best path is to use composite resources. A composite resource is a nested and parameterized configuration being used as a DSC resource within another configuration. Use of composite resources allows you to create complex configurations while allowing the underlying composite resources to be individually managed and built.

Azure Automation enables the import and compilation of composite resources. After importing composite resources into your Automation account, you can use Azure Automation State Configuration through the State Configuration (DSC) feature in the Azure portal.

Compose a configuration

Before you can assign a configuration made from composite resources in the Azure portal, you must compose the configuration. Composition uses Compose configuration on the State Configuration (DSC) page while on either the Configurations or the Compiled configurations tab.

  1. Sign in to the Azure portal.
  2. On the left, select All resources and then the name of your Automation account.
  3. On the Automation account page, select State configuration (DSC) under Configuration Management.
  4. On the State configuration (DSC) page, select either the Configurations or the Compiled configurations tab, then select Compose configuration in the menu at the top of the page.
  5. On the Basics step, provide the new configuration name (required) and select anywhere on the row of each composite resource that you want to include in your new configuration, then select Next or select the Source code step. For the following steps, we selected PSExecutionPolicy and RenameAndDomainJoin composite resources. Screenshot of the basics step of the compose configuration page
  6. The Source code step shows what the composed configuration of the selected composite resources looks like. You can see the merging of all parameters and how they're passed to the composite resource. When you're done reviewing the new source code, select Next or select the Parameters step. Screenshot of the source code step of the compose configuration page
  7. On the Parameters step, the parameter for each composite resource is exposed so that values can be provided. The description of the parameter is displayed next to the parameter field. If a parameter is a [PSCredential] type, the dropdown provides a list of Credential objects in the current Automation account. A + Add a credential option is also available. Provide values for the required parameters then select Save and compile. Screenshot of the parameters step of the compose configuration page

Submit the configuration for compilation

Submit the new configuration for compilation. You can view the status of the compilation job like you do with any imported configuration. For more information, see View a compilation job.

The successfully completed configuration appears in the Compiled configurations tab. Then you can assign the configuration to a managed node, using the steps in Reassigning a node to a different node configuration.

Next steps