>> Learn what Azure Resource Manager templates are and how to
use them in this episode of Azure Tips and Tricks.
You can use ARM templates or
Azure Resource Manager templates to
describe your infrastructure and deploy it.
Let's take a look at how that works.
Here in the Azure portal,
I'll start by creating a new Web app. Here we are.
I'll fill in a name as usual,
but now I click on "Automation Options" instead of "Create".
This will open up the ARM templates that's
actually behind the creation of this Web app.
It's a description of the Web app in JSON.
Here, you can see the resources that this script will create;
a Web app and also an Application Insights.
All right. Let's click "Deploy".
Because now from here,
I can choose to edit the ARM template. Let's do that.
I want to change this template
so that it has pre-filled application settings.
This might be useful if I want a templates that
always deploys a Web app with the same app settings.
To do that, I'll change these lines.
Now they have static values. All right,
I'll save this template.
Next, I need to complete this form.
First, I'll pick an existing resource group and I'll put
in the hosting environment which I
wants to be Windows in this case.
Finally, I have to read the agreement and accept it.
That's it. Now, when I click "Purchase",
the ARM template will be deployed.
This can take a minute. So, I'll skip ahead to when it is done.
This is the Web app that has just
been deployed based on the ARM template.
It's a regular Web app like we expect.
Let's see if the application settings are there.
There they are, all of the settings that we put in the template.
You might want the values to these settings to be dynamic.
So, let's create a templates that does that.
I'll start by searching for templates. Here we go.
This is the place where we can manage our ARM templates.
Let's create a new one.
I'll put in a name for it.
I have to type in a description as well.
Okay. Now for the template,
I have something prepared that I'll just paste in.
Let me maximize the plate so that it's easier to read.
This template deploys a Web app.
It has parameters for
the application settings as you can see here.
We use these parameters further down the template here.
So, instead of the static values,
I now use the parameter values.
Okay. Let's add it. Here we go.
Now let's go to the template.
From here, I can deploy it.
So, I'll click here.
Again, I have to complete the form.
I'll pick an existing resource group.
Next, I type in a name and a name for the App Service plan.
Here, I need to enter values for
the application settings because
they are filled with parameters now.
They are dynamic now.
I'll leave the pricing tier as is.
Again, I must accept the agreement. That's it.
The ARM template is now deploying the Web app.
I'll skip ahead to when it is finished.
Here we go. This is the Web app.
So, let's check if the application settings are correct.
Yes, here they are with the values that I've put in.
ARM templates are a great way to automate
your deployments and increase speed and quality in the process,
and there very easy to use.
There is even an ARM template library website
which contains lots of templates for many scenarios.
You can use a lot of them as they
are or you can customize them to your needs.