JSON compareHide
compare mode:
side-by-side
line-by-line
version left: 2.3.0 2.2.0 2.0.0 1.0.0
version right: 2.4.0 2.3.0 2.2.0 2.0.0 1.0.0
@@ -3,9 +3,9 @@
3
"policyType": "BuiltIn",
4
"mode": "Indexed",
5
"description": "Azure Automanage enrolls, configures, and monitors virtual machines with best practice as defined in the Microsoft Cloud Adoption Framework for Azure. Use this policy to apply Automanage to your selected scope.",
6
"metadata": {
7
-
"version": "2.3.0",
8
"category": "Automanage"
9
},
10
"parameters": {
11
"configurationProfileAssignment": {
@@ -579,8 +579,11 @@
579
"parameters": {
580
"machineName": {
581
"value": "[field('Name')]"
582
},
583
"configurationProfileAssignment": {
584
"value": "[parameters('configurationProfileAssignment')]"
585
}
586
},
@@ -590,20 +593,33 @@
590
"parameters": {
591
"machineName": {
592
"type": "String"
593
},
594
"configurationProfileAssignment": {
595
"type": "string"
596
}
597
},
598
"resources": [
599
{
600
"type": "Microsoft.Compute/virtualMachines/providers/configurationProfileAssignments",
601
"apiVersion": "2022-05-04",
602
"name": "[concat(parameters('machineName'), '/Microsoft.Automanage/', 'default')]",
603
"properties": {
604
"configurationProfile": "[parameters('configurationProfileAssignment')]"
605
}
606
}
607
]
608
}
609
}
3
"policyType": "BuiltIn",
4
"mode": "Indexed",
5
"description": "Azure Automanage enrolls, configures, and monitors virtual machines with best practice as defined in the Microsoft Cloud Adoption Framework for Azure. Use this policy to apply Automanage to your selected scope.",
6
"metadata": {
7
+
"version": "2.4 .0",
8
"category": "Automanage"
9
},
10
"parameters": {
11
"configurationProfileAssignment": {
579
"parameters": {
580
"machineName": {
581
"value": "[field('Name')]"
582
},
583
+
"resourceType": {
584
+
"value": "[field('Type')]"
585
+
},
586
"configurationProfileAssignment": {
587
"value": "[parameters('configurationProfileAssignment')]"
588
}
589
},
593
"parameters": {
594
"machineName": {
595
"type": "String"
596
},
597
+
"resourceType": {
598
+
"type": "String"
599
+
},
600
"configurationProfileAssignment": {
601
"type": "string"
602
}
603
},
604
"resources": [
605
{
606
+
"condition": "[equals(toLower(parameters('resourceType')), 'microsoft.compute/virtualmachines')]",
607
"type": "Microsoft.Compute/virtualMachines/providers/configurationProfileAssignments",
608
"apiVersion": "2022-05-04",
609
"name": "[concat(parameters('machineName'), '/Microsoft.Automanage/', 'default')]",
610
"properties": {
611
"configurationProfile": "[parameters('configurationProfileAssignment')]"
612
}
613
+
},
614
+
{
615
+
"condition": "[equals(toLower(parameters('resourceType')), 'microsoft.hybridcompute/machines')]",
616
+
"type": "Microsoft.HybridCompute/machines/providers/configurationProfileAssignments",
617
+
"apiVersion": "2022-05-04",
618
+
"name": "[concat(parameters('machineName'), '/Microsoft.Automanage/', 'default')]",
619
+
"properties": {
620
+
"configurationProfile": "[parameters('configurationProfileAssignment')]"
621
+
}
622
}
623
]
624
}
625
}
JSON
api-version=2021-06-01
Copy definition Copy definition 4 EPAC EPAC
{ 7 items displayName: "Configure virtual machines to be onboarded to Azure Automanage" , policyType: "BuiltIn" , mode: "Indexed" , description: "Azure Automanage enrolls, configures, and monitors virtual machines with best practice as defined in the Microsoft Cloud Adoption Framework for Azure. Use this policy to apply Automanage to your selected scope." , metadata: { 2 items version: "2.4.0" , category: "Automanage" } , parameters: { 4 items configurationProfileAssignment: { 4 items type: "String" , metadata: { 2 items displayName: "Configuration profile" , description: "The management services provided are based on whether the machine is intended to be used in a dev/test environment or production." } , allowedValues: [ 2 items "/providers/Microsoft.Automanage/bestPractices/azurebestpracticesproduction" , "/providers/Microsoft.Automanage/bestPractices/azurebestpracticesdevtest" ] , defaultValue: "/providers/Microsoft.Automanage/bestPractices/azurebestpracticesproduction" } , effect: { 4 items type: "String" , metadata: { 2 items displayName: "Effect" , description: "Enable or disable the execution of this policy" } , allowedValues: [ 3 items "AuditIfNotExists" , "DeployIfNotExists" , "Disabled" ] , defaultValue: "DeployIfNotExists" } , inclusionTagName: { 3 items type: "String" , metadata: { 2 items displayName: "Inclusion Tag Name" , description: "Name of the tag to use for including VMs in the scope of this policy. This should be used along with the Inclusion Tag Value parameter." } , defaultValue: "" } , inclusionTagValues: { 3 items type: "Array" , metadata: { 2 items displayName: "Inclusion Tag Values" , description: "Value of the tag to use for including VMs in the scope of this policy (in case of multiple values, use a comma-separated list). This should be used along with the Inclusion Tag Name parameter." } , defaultValue : [] } } , policyRule: { 2 items if: { 1 item allOf: [ 4 items { 1 item anyOf: [ 3 items { 2 items field: 🔍 "[
concat(
'tags[
',
parameters('inclusionTagName'),
'
]'
)
]", in: "[parameters('inclusionTagValues')]" } , { 2 items value: 🔍 "[
empty(
parameters('inclusionTagValues')
)
]", equals: "true" } , { 2 items value: 🔍 "[
empty(
parameters('inclusionTagName')
)
]", equals: "true" } ] } , { 2 items field: "location" , in: [ 15 items "eastus" , "eastus2" , "westus" , "westus2" , "centralus" , "southcentralus" , "westcentralus" , "northeurope" , "westeurope" , "canadacentral" , "japaneast" , "uksouth" , "australiaeast" , "australiasoutheast" , "southeastasia" ] } , { 2 items field: "type" , in: [ 2 items "Microsoft.Compute/virtualMachines" , "Microsoft.HybridCompute/machines" ] } , { 1 item anyOf: [ 30 items { 2 items field: "Microsoft.Compute/imagePublisher" , in: [ 7 items "esri" , "incredibuild" , "MicrosoftDynamicsAX" , "MicrosoftSharepoint" , "MicrosoftVisualStudio" , "MicrosoftWindowsDesktop" , "MicrosoftWindowsServerHPCPack" ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "MicrosoftWindowsServer" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "2008*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "MicrosoftSQLServer" } , { 2 items field: "Microsoft.Compute/imageOffer" , notLike: "SQL2008*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "microsoft-dsvm" } , { 2 items field: "Microsoft.Compute/imageOffer" , equals: "dsvm-windows" } ] } , { 1 item } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "batch" } , { 2 items field: "Microsoft.Compute/imageOffer" , equals: "rendering-windows2016" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "center-for-internet-security-inc" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "cis-windows-server-201*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "pivotal" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "bosh-windows-server*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "cloud-infrastructure-services" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "ad*" } ] } , { 1 item allOf: [ 3 items { 1 item anyOf: [ 2 items { 2 items field: "Microsoft.Compute/virtualMachines/osProfile.windowsConfiguration" , exists: "true" } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.osDisk.osType" , like: "Windows*" } ] } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.imageReference.id" , exists: "true" } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.imageReference.sku" , exists: "false" } ] } , { 2 items field: "Microsoft.Compute/imagePublisher" , in: [ 8 items "microsoft-aks" , "qubole-inc" , "datastax" , "couchbase" , "scalegrid" , "checkpoint" , "paloaltonetworks" , "debian" ] } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "OpenLogic" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "CentOS*" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "6*" } ] } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "OpenLogic" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "CentOS*" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "8*" } ] } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "RedHat" } , { 2 items field: "Microsoft.Compute/imageOffer" , in: [ 7 items "RHEL" , "RHEL-HA" , "RHEL-SAP" , "RHEL-SAP-APPS" , "RHEL-SAP-HA" , "RHEL-SAP-HANA" , "rhel-raw" ] } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "6*" } ] } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "RedHat" } , { 2 items field: "Microsoft.Compute/imageOffer" , in: [ 7 items "RHEL" , "RHEL-HA" , "RHEL-SAP" , "RHEL-SAP-APPS" , "RHEL-SAP-HA" , "RHEL-SAP-HANA" , "rhel-raw" ] } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "8*" } ] } , { 1 item } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "center-for-internet-security-inc" } , { 2 items field: "Microsoft.Compute/imageOffer" , in: [ 12 items "cis-centos-7-l1" , "cis-centos-7-v2-1-1-l1" , "cis-nginx-centos-7-v1-1-0-l1" , "cis-oracle-linux-7-v2-0-0-l1" , "cis-postgresql-11-centos-linux-7-level-1" , "cis-rhel-7-l2" , "cis-rhel-7-v2-2-0-l1" , "cis-suse-linux-12-v2-0-0-l1" , "cis-suse15-l1" , "cis-ubuntu-linux-1604-v1-0-0-l1" , "cis-ubuntu-linux-1804-l1" , "cis-ubuntu-linux-2004-l1" ] } ] } , { 1 item } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "Suse" } , { 2 items field: "Microsoft.Compute/imageOffer" , like: "SLES*" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "11*" } ] } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "Canonical" } , { 2 items field: "Microsoft.Compute/imageOffer" , equals: "UbuntuServer" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "12*" } ] } , { 1 item } , { 1 item allOf: [ 3 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "cloudera" } , { 2 items field: "Microsoft.Compute/imageOffer" , equals: "cloudera-centos-os" } , { 2 items field: "Microsoft.Compute/imageSKU" , notLike: "6*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.Compute/imagePublisher" , equals: "cloudera" } , { 2 items field: "Microsoft.Compute/imageOffer" , equals: "cloudera-altus-centos-os" } ] } , { 1 item } , { 1 item allOf: [ 3 items { 1 item anyOf: [ 2 items { 2 items field: "Microsoft.Compute/virtualMachines/osProfile.linuxConfiguration" , exists: "true" } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.osDisk.osType" , like: "Linux*" } ] } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.imageReference.id" , exists: "true" } , { 2 items field: "Microsoft.Compute/virtualMachines/storageProfile.imageReference.sku" , exists: "false" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "CentOS*" } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , notLike: "Linux 6*" } ] } , { 1 item allOf: [ 2 items { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Windows Server*" } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , notLike: "2008*" } ] } , { 1 item anyOf: [ 2 items { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Red Hat Enterprise Linux 8.*" } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Red Hat Enterprise Linux 7.*" } ] } , { 1 item anyOf: [ 3 items { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Ubuntu 18.04*" } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Ubuntu 16.04*" } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "Ubuntu 20.04*" } ] } , { 1 item anyOf: [ 2 items { 2 items field: "Microsoft.HybridCompute/machines/osSku" , in: [ 3 items "SUSE Linux Enterprise Server 12 SP3" , "SUSE Linux Enterprise Server 12 SP4" , "SUSE Linux Enterprise Server 12 SP5" ] } , { 2 items field: "Microsoft.HybridCompute/machines/osSku" , like: "SUSE Linux Enterprise Server 15*" } ] } ] } ] } , then: { 2 items effect: "[parameters('effect')]" , details: { 5 items roleDefinitionIds: [ 1 item "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c" Contributor ] , type: "Microsoft.Automanage/configurationProfileAssignments" , name: "default" , existenceCondition: { 1 item allOf: [ 1 item { 2 items field: "Microsoft.Automanage/configurationProfileAssignments/configurationProfile" , equals: "[parameters('configurationProfileAssignment')]" } ] } , deployment: { 1 item properties: { 3 items mode: "incremental" , parameters: { 3 items } , template: { 4 items $schema: "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" , contentVersion: "1.0.0.0" , parameters: { 3 items } , resources: [ 2 items { 5 items condition: 🔍 "[
equals(
toLower(
parameters('resourceType')
),
'microsoft.compute/virtualmachines'
)
]", type: "Microsoft.Compute/virtualMachines/providers/configurationProfileAssignments" , apiVersion: "2022-05-04" , name: 🔍 "[
concat(
parameters('machineName'),
'/Microsoft.Automanage/',
'default'
)
]", properties: { 1 item configurationProfile: "[parameters('configurationProfileAssignment')]" } } , { 5 items condition: 🔍 "[
equals(
toLower(
parameters('resourceType')
),
'microsoft.hybridcompute/machines'
)
]", type: "Microsoft.HybridCompute/machines/providers/configurationProfileAssignments" , apiVersion: "2022-05-04" , name: 🔍 "[
concat(
parameters('machineName'),
'/Microsoft.Automanage/',
'default'
)
]", properties: { 1 item configurationProfile: "[parameters('configurationProfileAssignment')]" } } ] } } } } } } }