Deploy from a template
In the previous section, we had a look at the ARM template, which will configure several resources. Now that we have both of the ARM templates (the main template and the parameters file), let’s go ahead and see how to deploy this template.
We will begin by deploying the ARM templates via the Azure portal through the following steps:
- Navigate to the Azure portal by opening a web browser and going to https:// portal.azure.com.
- In the left menu, selectResource groups:
Figure 9.5 – Azure resource groups
- Next, choose the resource group you want to deploy the ARM template to:
Figure 9.6 – Selecting a specific resource group
- Click on Create:
Figure 9.7 – Selecting Create on the resource group
- In the search bar, type in template and choose Template deployment (deploy using custom and click on Create on the next page:
Figure 9.8 – Search for template and select template deployment in the Azure marketplace
- Select Build your own template in the editor:
Figure 9.9 – Choosing to build our own ARM template
- Copy all the text from the VHD template from the previous section and overwrite the existing configuration and click on the Save button at the bottom of the page:
Figure 9.10 – ARM template main file
- Next, click on Edit parameters and copy the parameters script from the previous VHD section, overwrite the existing configuration, and click on Save:
Figure 9.11 – Selecting to edit parameters
Figure 9.12 – ARM template parameters file
You will notice that all the required parameters have been inserted into the parameters file. We are now ready to click on Review + create. After passing the validation, you can click on Create and the resources will be created by the custom ARM template:
Figure 9.13 – Overview of resources to be deployed via ARM template
- After the deployment has succeeded, you can view the resources under the specified resource group:
Figure 9.14 – Resources successfully created via ARM template
We have successfully deployed a custom ARM template with a parameters file via the Azure portal. In the next section, we are going to look at how to save a deployment in ARM template format to automate future deployments.