|
| 1 | +--- |
| 2 | +title: Onboard an Azure Arc-enabled server to Azure Automanage with an ARM template |
| 3 | +description: Learn how to onboard an Azure Arc-enabled server to Azure Automanage with an Azure Resource Manager template. |
| 4 | +ms.service: automanage |
| 5 | +ms.workload: infrastructure |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 02/25/2022 |
| 8 | +--- |
| 9 | + |
| 10 | +# Onboard an Azure Arc-enabled server to Automanage with an Azure Resource Manager template (ARM template) |
| 11 | + |
| 12 | + |
| 13 | +Follow the steps to onboard an Azure Arc-enabled server to Automanage Best Practices using an ARM template. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | +* You must have an Azure Arc-enabled server already registered in your subscription |
| 17 | +* You must have necessary [Role-based access control permissions](./automanage-virtual-machines.md#required-rbac-permissions) |
| 18 | +* You must use one of the [supported operating systems](./automanage-arc.md#supported-operating-systems) |
| 19 | + |
| 20 | +## ARM template overview |
| 21 | +The following ARM template will onboard your specified Azure Arc-enabled server onto Azure Automanage Best Practices. Details on the ARM template and steps on how to deploy are located in the ARM template deployment [section](#arm-template-deployment). |
| 22 | +```json |
| 23 | +{ |
| 24 | + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", |
| 25 | + "contentVersion": "1.0.0.0", |
| 26 | + "parameters": { |
| 27 | + "machineName": { |
| 28 | + "type": "String" |
| 29 | + }, |
| 30 | + "configurationProfile": { |
| 31 | + "type": "String" |
| 32 | + } |
| 33 | + }, |
| 34 | + "resources": [ |
| 35 | + { |
| 36 | + "type": "Microsoft.HybridCompute/machines/providers/configurationProfileAssignments", |
| 37 | + "apiVersion": "2021-04-30-preview", |
| 38 | + "name": "[concat(parameters('machineName'), '/Microsoft.Automanage/default')]", |
| 39 | + "properties": { |
| 40 | + "configurationProfile": "[parameters('configurationProfile')]" |
| 41 | + } |
| 42 | + } |
| 43 | + ] |
| 44 | +} |
| 45 | +``` |
| 46 | + |
| 47 | +## ARM template deployment |
| 48 | +This ARM template will create a configuration profile assignment for your specified Azure Arc-enabled machine. |
| 49 | + |
| 50 | +The `configurationProfile` value can be one of the following values: |
| 51 | +* "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction" |
| 52 | +* "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest" |
| 53 | + |
| 54 | +Follow these steps to deploy the ARM template: |
| 55 | +1. Save this ARM template as `azuredeploy.json`. |
| 56 | +1. Run this ARM template deployment with `az deployment group create --resource-group myResourceGroup --template-file azuredeploy.json`. |
| 57 | +1. Provide the values for machineName, and configurationProfileAssignment when prompted. |
| 58 | +1. You're ready to deploy. |
| 59 | + |
| 60 | +As with any ARM template, it's possible to factor out the parameters into a separate `azuredeploy.parameters.json` file and use that as an argument when deploying. |
| 61 | + |
| 62 | +## Next steps |
| 63 | +Learn more about Automanage for [Azure Arc](./automanage-arc.md). |
0 commit comments