Quickstart: Create instance of Azure Database Migration Service using ARM template

Use this Azure Resource Manager template (ARM template) to deploy an instance of the Azure Database Migration Service.

An Azure Resource Manager template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax. You describe your intended deployment without writing the sequence of programming commands to create the deployment.

If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.

Button to deploy the Resource Manager template to Azure.

Prerequisites

The Azure Database Migration Service ARM template requires the following:

Review the template

The template used in this quickstart is from Azure Quickstart Templates.

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.5.6.12127",
      "templateHash": "8168829270523391611"
    }
  },
  "parameters": {
    "serviceName": {
      "type": "string",
      "metadata": {
        "description": "Name of the new migration service."
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location where the resources will be deployed."
      }
    },
    "vnetName": {
      "type": "string",
      "metadata": {
        "description": "Name of the new virtual network."
      }
    },
    "subnetName": {
      "type": "string",
      "metadata": {
        "description": "Name of the new subnet associated with the virtual network."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Network/virtualNetworks",
      "apiVersion": "2021-05-01",
      "name": "[parameters('vnetName')]",
      "location": "[parameters('location')]",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "10.0.0.0/16"
          ]
        }
      }
    },
    {
      "type": "Microsoft.Network/virtualNetworks/subnets",
      "apiVersion": "2021-05-01",
      "name": "[format('{0}/{1}', parameters('vnetName'), parameters('subnetName'))]",
      "properties": {
        "addressPrefix": "10.0.0.0/24"
      },
      "dependsOn": [
        "[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]"
      ]
    },
    {
      "type": "Microsoft.DataMigration/services",
      "apiVersion": "2021-10-30-preview",
      "name": "[parameters('serviceName')]",
      "location": "[parameters('location')]",
      "sku": {
        "tier": "Standard",
        "size": "1 vCores",
        "name": "Standard_1vCores"
      },
      "properties": {
        "virtualSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]"
      },
      "dependsOn": [
        "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]"
      ]
    }
  ]
}

Three Azure resources are defined in the template:

More Azure Database Migration Services templates can be found in the quickstart template gallery.

Deploy the template

  1. Select the following image to sign in to Azure and open a template. The template creates an instance of the Azure Database Migration Service.

    Button to deploy the Resource Manager template to Azure.

  2. Select or enter the following values.

    • Subscription: Select an Azure subscription.
    • Resource group: Select an existing resource group from the drop down, or select Create new to create a new resource group.
    • Region: Location where the resources will be deployed.
    • Service Name: Name of the new migration service.
    • Location: The location of the resource group, leave as the default of [resourceGroup().location].
    • Vnet Name: Name of the new virtual network.
    • Subnet Name: Name of the new subnet associated with the virtual network.
  3. Select Review + create. After the instance of Azure Database Migration Service has been deployed successfully, you get a notification.

The Azure portal is used to deploy the template. In addition to the Azure portal, you can also use the Azure PowerShell, Azure CLI, and REST API. To learn other deployment methods, see Deploy templates.

Review deployed resources

You can use the Azure CLI to check deployed resources.

echo "Enter the resource group where your SQL Server VM exists:" &&
read resourcegroupName &&
az resource list --resource-group $resourcegroupName 

Clean up resources

When no longer needed, delete the resource group by using Azure CLI or Azure PowerShell:

echo "Enter the Resource Group name:" &&
read resourceGroupName &&
az group delete --name $resourceGroupName &&
echo "Press [ENTER] to continue ..."

Next steps

For a step-by-step tutorial that guides you through the process of creating a template, see:

For other ways to deploy Azure Database Migration Service, see:

To learn more, see an overview of Azure Database Migration Service