Bicep resource definition
The guestConfigurationAssignments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.GuestConfiguration/guestConfigurationAssignments resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.GuestConfiguration/guestConfigurationAssignments@2024-04-05' = {
scope: resourceSymbolicName or scope
location: 'string'
name: 'string'
properties: {
context: 'string'
guestConfiguration: {
assignmentType: 'string'
configurationParameter: [
{
name: 'string'
value: 'string'
}
]
configurationProtectedParameter: [
{
name: 'string'
value: 'string'
}
]
contentHash: 'string'
contentManagedIdentity: 'string'
contentUri: 'string'
kind: 'string'
name: 'string'
version: 'string'
}
latestAssignmentReport: {
assignment: {
configuration: {}
}
resources: [
{
reasons: [
{}
]
}
]
vm: {}
}
vmssVMList: [
{}
]
}
}
Property Values
AssignmentInfo
Name |
Description |
Value |
configuration |
Information about the configuration. |
ConfigurationInfo |
AssignmentReport
Name |
Description |
Value |
assignment |
Configuration details of the guest configuration assignment. |
AssignmentInfo |
resources |
The list of resources for which guest configuration assignment compliance is checked. |
AssignmentReportResource[] |
vm |
Information about the VM. |
VMInfo |
AssignmentReportResource
AssignmentReportResourceComplianceReason
ConfigurationInfo
ConfigurationParameter
Name |
Description |
Value |
name |
Name of the configuration parameter. |
string |
value |
Value of the configuration parameter. |
string |
GuestConfigurationAssignmentProperties
Name |
Description |
Value |
context |
The source which initiated the guest configuration assignment. Ex: Azure Policy |
string |
guestConfiguration |
The guest configuration to assign. |
GuestConfigurationNavigation |
latestAssignmentReport |
Last reported guest configuration assignment report. |
AssignmentReport |
vmssVMList |
The list of VM Compliance data for VMSS |
VmssvmInfo[] |
GuestConfigurationNavigation
Name |
Description |
Value |
assignmentType |
Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. |
'ApplyAndAutoCorrect' 'ApplyAndMonitor' 'Audit' 'DeployAndAutoCorrect' |
configurationParameter |
The configuration parameters for the guest configuration. |
ConfigurationParameter[] |
configurationProtectedParameter |
The protected configuration parameters for the guest configuration. |
ConfigurationParameter[] |
contentHash |
Combined hash of the guest configuration package and configuration parameters. |
string |
contentManagedIdentity |
Managed identity with storage access of the guest configuration package and configuration parameters. |
string |
contentUri |
Uri of the storage where guest configuration package is uploaded. |
string |
kind |
Kind of the guest configuration. For example:DSC |
'DSC' |
name |
Name of the guest configuration. |
string |
version |
Version of the guest configuration. |
string |
Microsoft.GuestConfiguration/guestConfigurationAssignments
Name |
Description |
Value |
location |
Region where the VM is located. |
string |
name |
The resource name |
string (required) |
properties |
Properties of the Guest configuration assignment. |
GuestConfigurationAssignmentProperties |
scope |
Use when creating a resource at a scope that is different than the deployment scope. |
Set this property to the symbolic name of a resource to apply the extension resource. |
VMInfo
VmssvmInfo
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File |
Description |
IIS VMs & SQL Server 2014 VM |
Create 1 or 2 IIS Windows 2012 R2 Web Servers and one back end SQL Server 2014 in VNET. |
Windows VM with Azure secure baseline |
The template creates a virtual machine running Windows Server in a new virtual network, with a public IP address. Once the machine has deployed, the guest configuration extension is installed and the Azure secure baseline for Windows Server is applied. If the configuration of the machines drifts, you can re-apply the settings by deploying the template again. |
ARM template resource definition
The guestConfigurationAssignments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.GuestConfiguration/guestConfigurationAssignments resource, add the following JSON to your template.
{
"type": "Microsoft.GuestConfiguration/guestConfigurationAssignments",
"apiVersion": "2024-04-05",
"name": "string",
"location": "string",
"properties": {
"context": "string",
"guestConfiguration": {
"assignmentType": "string",
"configurationParameter": [
{
"name": "string",
"value": "string"
}
],
"configurationProtectedParameter": [
{
"name": "string",
"value": "string"
}
],
"contentHash": "string",
"contentManagedIdentity": "string",
"contentUri": "string",
"kind": "string",
"name": "string",
"version": "string"
},
"latestAssignmentReport": {
"assignment": {
"configuration": {
}
},
"resources": [
{
"reasons": [
{
}
]
}
],
"vm": {
}
},
"vmssVMList": [
{
}
]
}
}
Property Values
AssignmentInfo
Name |
Description |
Value |
configuration |
Information about the configuration. |
ConfigurationInfo |
AssignmentReport
Name |
Description |
Value |
assignment |
Configuration details of the guest configuration assignment. |
AssignmentInfo |
resources |
The list of resources for which guest configuration assignment compliance is checked. |
AssignmentReportResource[] |
vm |
Information about the VM. |
VMInfo |
AssignmentReportResource
AssignmentReportResourceComplianceReason
ConfigurationInfo
ConfigurationParameter
Name |
Description |
Value |
name |
Name of the configuration parameter. |
string |
value |
Value of the configuration parameter. |
string |
GuestConfigurationAssignmentProperties
Name |
Description |
Value |
context |
The source which initiated the guest configuration assignment. Ex: Azure Policy |
string |
guestConfiguration |
The guest configuration to assign. |
GuestConfigurationNavigation |
latestAssignmentReport |
Last reported guest configuration assignment report. |
AssignmentReport |
vmssVMList |
The list of VM Compliance data for VMSS |
VmssvmInfo[] |
GuestConfigurationNavigation
Name |
Description |
Value |
assignmentType |
Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. |
'ApplyAndAutoCorrect' 'ApplyAndMonitor' 'Audit' 'DeployAndAutoCorrect' |
configurationParameter |
The configuration parameters for the guest configuration. |
ConfigurationParameter[] |
configurationProtectedParameter |
The protected configuration parameters for the guest configuration. |
ConfigurationParameter[] |
contentHash |
Combined hash of the guest configuration package and configuration parameters. |
string |
contentManagedIdentity |
Managed identity with storage access of the guest configuration package and configuration parameters. |
string |
contentUri |
Uri of the storage where guest configuration package is uploaded. |
string |
kind |
Kind of the guest configuration. For example:DSC |
'DSC' |
name |
Name of the guest configuration. |
string |
version |
Version of the guest configuration. |
string |
Microsoft.GuestConfiguration/guestConfigurationAssignments
Name |
Description |
Value |
apiVersion |
The api version |
'2024-04-05' |
location |
Region where the VM is located. |
string |
name |
The resource name |
string (required) |
properties |
Properties of the Guest configuration assignment. |
GuestConfigurationAssignmentProperties |
type |
The resource type |
'Microsoft.GuestConfiguration/guestConfigurationAssignments' |
VMInfo
VmssvmInfo
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template |
Description |
IIS VMs & SQL Server 2014 VM
 |
Create 1 or 2 IIS Windows 2012 R2 Web Servers and one back end SQL Server 2014 in VNET. |
Windows VM with Azure secure baseline
 |
The template creates a virtual machine running Windows Server in a new virtual network, with a public IP address. Once the machine has deployed, the guest configuration extension is installed and the Azure secure baseline for Windows Server is applied. If the configuration of the machines drifts, you can re-apply the settings by deploying the template again. |
The guestConfigurationAssignments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.GuestConfiguration/guestConfigurationAssignments resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.GuestConfiguration/guestConfigurationAssignments@2024-04-05"
name = "string"
parent_id = "string"
location = "string"
body = {
properties = {
context = "string"
guestConfiguration = {
assignmentType = "string"
configurationParameter = [
{
name = "string"
value = "string"
}
]
configurationProtectedParameter = [
{
name = "string"
value = "string"
}
]
contentHash = "string"
contentManagedIdentity = "string"
contentUri = "string"
kind = "string"
name = "string"
version = "string"
}
latestAssignmentReport = {
assignment = {
configuration = {
}
}
resources = [
{
reasons = [
{
}
]
}
]
vm = {
}
}
vmssVMList = [
{
}
]
}
}
}
Property Values
AssignmentInfo
Name |
Description |
Value |
configuration |
Information about the configuration. |
ConfigurationInfo |
AssignmentReport
Name |
Description |
Value |
assignment |
Configuration details of the guest configuration assignment. |
AssignmentInfo |
resources |
The list of resources for which guest configuration assignment compliance is checked. |
AssignmentReportResource[] |
vm |
Information about the VM. |
VMInfo |
AssignmentReportResource
AssignmentReportResourceComplianceReason
ConfigurationInfo
ConfigurationParameter
Name |
Description |
Value |
name |
Name of the configuration parameter. |
string |
value |
Value of the configuration parameter. |
string |
GuestConfigurationAssignmentProperties
Name |
Description |
Value |
context |
The source which initiated the guest configuration assignment. Ex: Azure Policy |
string |
guestConfiguration |
The guest configuration to assign. |
GuestConfigurationNavigation |
latestAssignmentReport |
Last reported guest configuration assignment report. |
AssignmentReport |
vmssVMList |
The list of VM Compliance data for VMSS |
VmssvmInfo[] |
GuestConfigurationNavigation
Name |
Description |
Value |
assignmentType |
Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. |
'ApplyAndAutoCorrect' 'ApplyAndMonitor' 'Audit' 'DeployAndAutoCorrect' |
configurationParameter |
The configuration parameters for the guest configuration. |
ConfigurationParameter[] |
configurationProtectedParameter |
The protected configuration parameters for the guest configuration. |
ConfigurationParameter[] |
contentHash |
Combined hash of the guest configuration package and configuration parameters. |
string |
contentManagedIdentity |
Managed identity with storage access of the guest configuration package and configuration parameters. |
string |
contentUri |
Uri of the storage where guest configuration package is uploaded. |
string |
kind |
Kind of the guest configuration. For example:DSC |
'DSC' |
name |
Name of the guest configuration. |
string |
version |
Version of the guest configuration. |
string |
Microsoft.GuestConfiguration/guestConfigurationAssignments
Name |
Description |
Value |
location |
Region where the VM is located. |
string |
name |
The resource name |
string (required) |
parent_id |
The ID of the resource to apply this extension resource to. |
string (required) |
properties |
Properties of the Guest configuration assignment. |
GuestConfigurationAssignmentProperties |
type |
The resource type |
"Microsoft.GuestConfiguration/guestConfigurationAssignments@2024-04-05" |
VMInfo
VmssvmInfo