diff --git a/assets/resourceSnippets/Automanage Best Practices DevTest Assignment.snippet.json b/assets/resourceSnippets/Automanage Best Practices DevTest Assignment.snippet.json new file mode 100644 index 000000000..047c4e97d --- /dev/null +++ b/assets/resourceSnippets/Automanage Best Practices DevTest Assignment.snippet.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "prefix": "arm-automanage-bp-devtest-assignment", + "description": "Create a Best Practices DevTest Configuration Profile Assignment" + }, + "resources": [ + { + "scope": "'Microsoft.Compute/virtualMachines/${1:vmName}", + "type": "Microsoft.Automanage/configurationProfileAssignments", + "apiVersion": "2022-05-04", + "name": "default", + "properties": { + "configurationProfile": "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest" + } + } + ] +} diff --git a/assets/resourceSnippets/Automanage Best Practices Prod Assignment.snippet.json b/assets/resourceSnippets/Automanage Best Practices Prod Assignment.snippet.json new file mode 100644 index 000000000..3017aa910 --- /dev/null +++ b/assets/resourceSnippets/Automanage Best Practices Prod Assignment.snippet.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "prefix": "arm-automanage-bp-prod-assignment", + "description": "Create a Best Practices Production Configuration Profile Assignment" + }, + "resources": [ + { + "scope": "'Microsoft.Compute/virtualMachines/${1:vmName}", + "type": "Microsoft.Automanage/configurationProfileAssignments", + "apiVersion": "2022-05-04", + "name": "default", + "properties": { + "configurationProfile": "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction" + } + } + ] +} diff --git a/assets/resourceSnippets/Automanage Create Custom Profile.snippet.json b/assets/resourceSnippets/Automanage Create Custom Profile.snippet.json new file mode 100644 index 000000000..97e43e163 --- /dev/null +++ b/assets/resourceSnippets/Automanage Create Custom Profile.snippet.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "prefix": "arm-automanage-custom-profile", + "description": "Create a Custom Automanage Configuration Profile" + }, + "resources": [ + { + "name": "${1:automanage}", + "type": "Microsoft.Automanage/configurationProfiles", + "apiVersion": "2022-05-04", + "location": "[resourceGroup().location]", + "properties": { + "configuration": { + "Antimalware/Enable": true, + "Antimalware/Exclusions/Paths": "", + "Antimalware/Exclusions/Extensions": "", + "Antimalware/Exclusions/Processes": "", + "Antimalware/EnableRealTimeProtection": true, + "Antimalware/RunScheduledScan": true, + "Antimalware/ScanType": "Quick", + "Antimalware/ScanDay": 7, + "Antimalware/ScanTimeInMinutes": 120, + "Backup/Enable": true, + "Backup/PolicyName": "dailyBackupPolicy", + "Backup/TimeZone": "UTC", + "Backup/InstantRpRetentionRangeInDays": 2, + "Backup/SchedulePolicy/ScheduleRunFrequency": "Daily", + "Backup/SchedulePolicy/SchedulePolicyType": "SimpleSchedulePolicy", + "Backup/RetentionPolicy/RetentionPolicyType": "LongTermRetentionPolicy", + "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": 180, + "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": "Days", + "WindowsAdminCenter/Enable": false, + "VMInsights/Enable": true, + "AzureSecurityCenter/Enable": true, + "UpdateManagement/Enable": true, + "ChangeTrackingAndInventory/Enable": true, + "GuestConfiguration/Enable": true, + "AutomationAccount/Enable": true, + "LogAnalytics/Enable": true, + "BootDiagnostics/Enable": true + } + } + } + ] +} diff --git a/assets/resourceSnippets/Automanage Custom Profile Assignment.snippet.json b/assets/resourceSnippets/Automanage Custom Profile Assignment.snippet.json new file mode 100644 index 000000000..239594202 --- /dev/null +++ b/assets/resourceSnippets/Automanage Custom Profile Assignment.snippet.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "metadata": { + "prefix": "arm-automanage-custom-assignment", + "description": "Create a Custom Automanage Configuration Profile Assignment" + }, + "resources": [ + { + "scope": "'Microsoft.Compute/virtualMachines/${1:vmName}", + "type": "Microsoft.Automanage/configurationProfileAssignments", + "apiVersion": "2022-05-04", + "name": "default", + "properties": { + "configurationProfile": "[resourceId('Microsoft.Automanage/configurationProfiles', '${2:configurationProfileName}')]" + } + } + ] +} diff --git a/test/functional/snippets.test.ts b/test/functional/snippets.test.ts index 6686643aa..bf060d68c 100644 --- a/test/functional/snippets.test.ts +++ b/test/functional/snippets.test.ts @@ -265,6 +265,12 @@ const overrideIgnoreSchemaValidation: { [name: string]: boolean } = { + 'Missing required property "protectedSettings"' */ "Linux VM Custom Script": true, + + // TODO: Remove when schemas are published + "Automanage Best Practices DevTest Assignment": true, + "Automanage Best Practices Prod Assignment": true, + "Automanage Create Custom Profile": true, + "Automanage Custom Profile Assignment": true, }; suite("Snippets functional tests", () => {