Learn how to edit a template that has already been saved in the Azure library and then deploy it to create a new deployment.
- [Instructor] One way to deploy templates is to do so from within Azure itself. In our previous video, we had gone ahead and saved the SimpleVM resource group to our Azure library. We did so by clicking on Automation Script and then Adding to Library. We provided a name and description. We did call it SimpleVMrev2. I'm going to go ahead and close this. Now let's go ahead and redeploy that template. To do so, you'll need to launch the template's blade.
To be honest with you, I can't tell what these icons represent, so I'm going to close this window, give me a little bit more real estate. There we go. I can either browser for it under More Services. In my case, I've already pinned it to the menu. I'm going to go ahead and click Templates. You will notice that we have three templates already available to us. You'll notice our first template, a basead, has been configured for one VM to be used for a DC and two VMs for ADFS servers.
Our second one, our fe_be_deployment, I'm just going to move this so we can actually see the description, this includes several VMs and subnets already pre-configured for us. Then, our last one is the one we created in the previous video, a simplevmrev2. As a reminder, this is just a single virtual machine in a single network. That's the one we're going to use for our demo. I'm going to go ahead and select it. We can see our template. So all of our parameters are listed for all of our storage accounts and our networks.
We do not have any variables here. Then, we have our resources, including the size of our virtual machine. I'd like to change our Standard A1 to a Standard A2, but I cannot edit it in this view. In order to edit the template, I must click on Edit and then click on the template itself and then scroll down. Our Standard A1 now becomes our Standard A2 and then click OK. Don't forget to click Save again.
Once the template has been saved, you can go ahead and close down this blade. Now we can go ahead and actually deploy the template. Now we can go ahead and modify the settings as required for this deployment. In my example, I'm going to go ahead and create a new resource group. I'm going to keep it very descriptive and call it SimpleVMrev3. My subscription and my location are already selected for me based on the previous template.
You'll notice all the parameters are already pre-populated. Again, this is one of the reasons why it's recommended converting those parameters to variables. I'm going to go ahead and provide the password. Again, I'm going to provide a name. I'm going to go ahead and rename some of our settings. Please note depending on the resource, you may have to come up with a unique name. Next, you're going to notice that we have our terms and conditions. This is here to state that, yes, you realize that you are deploying these resources and you will be billed by doing so, so you have to agree to the terms and conditions and then you have to click Purchase.
Again, understanding that you will be billed for these resources. Your template will be validated, and that is it. Your deployment has been started, and in about seven to eight minutes, we will have a completely new resource group based on the template we've already saved. It's been about seven minutes. Let's go ahead and check on our deployment. I'm going to go ahead and use the Notifications menu. We can see here that our deployment to resource group SimpleVM3 was successful.
Let's go ahead and take a look at it. I'm first going to close the Notifications window. Then, I'm going to scroll up and select Resource Groups. We're going to see that we now have a new resource group: SimpleVMrev3. All of our resources have been named. Let's go ahead and check out the actual virtual machine for its size, because remember, we changed it from an A1 to an A2.
I'm going to go ahead and click on our virtual machine. You will notice here that we now have a Standard A2 virtual machine. In this simple demo, you can see the power of using templates and how they can simplify your customized deployments to Azure.
- Implementing Azure Resource Manager templates
- Creating a template from a deployment
- Deploying a template using the portal
- Deploying a template using PowerShell
- Using Azure Quickstart Templates
- Using service principals
- Locking Azure resources
- Securing Azure subscriptions
- Azure active directory roles
- Designing custom RBAC roles