>> Welcome to today's episode.
Today we're going to talk about
Azure Resource Management templates.
We're going to talk about how,
and why we want to learn about them.
On today's episode, I've a very special guest with me.
I have Barbara Forbes from the Netherlands on today's show.
[MUSIC]
>> Welcome to the Azure Enablement show.
I am April Edwards.
I'm a senior software engineer here at
Microsoft. Welcome to the show.
In this show, we're going to have technical conversations with
trusted experts addressing some of
the most common questions that you might have,
and I might have, addressing
some of those obstacles as well that are
often found when we're navigating through our Cloud journey.
I'm really excited about this episode
today because I have a very, very special guest.
I have Barbara Forbes coming in from the Netherlands,
who is an automation expert and
an IT consultant in her day job. Welcome, Barbara.
>> Hi.
>> Really, really excited to have you here.
Today we're going to talk about ARM templates
and really how to learn about ARM templates.
When I started first working in Azure,
I just didn't know where to go,
how to learn about them, and I could see that
we could generate an ARM template in the portal.
I wasn't sure they'd be beneficial to me in the long run,
how I could use them long-term,
but I really wanted to
embrace infrastructure as code and I want to be able to
scale and be able to build things quickly
in the Cloud without making mistakes.
Because I, for one am really,
really good at making mistakes when I'm doing things manually.
I really want to hear about your learning journey,
how you learned about
how to write ARM templates and how to deploy it?
>> Yeah, well, like you said,
when you working in Azure and you're clicking around in
your portal and you're learning about
all the resources and it's all a lot of fun.
But at one stage,
you want to have some sort of automation.
You want to be able to deploy quicker, more consistently.
Then you learn about ARM templates.
When I first learned about it, I thought, well,
infrastructure as code as a whole,
it's intimidating, there's a lot going on
and how do you get started with those things?
There's one way but you already mentioned it,
I really like because it's
a very good introduction from your own environment,
and I can show you actually,
is where you can use the Azure portal.
Let's say you have your own resources already available.
Here I have all the resources for a Virtual Machine.
I can click on one of
those resources or I can click on all of them,
and every menu in Azure has this little button Export Template.
If I click on that,
I get an overview.
Well, basically I get an ARM template.
This is an ARM template with
all the resources that I already know,
so I click through them,
I know what they do and I can see here
exactly how the ARM template would work.
Now, this is a generated ARM template and it shows,
it's not something I would use in production,
but it is a nice introduction to find
out how is an ARM template structured and what can I expect.
>> Yes, absolutely, because it gives you
that actual structured layout of how to write an ARM template.
Because if you haven't worked with JSON before,
it can be really intimidating.
>> Yeah.
>> Very cool.
>> This is a great introduction to your very first ARM template.
>> Awesome. Where do we go from here?
I built something in the portal,
I've deployed it and I have an ARM template.
But I might need to build
something from scratch or I want to scale it
and I actually need to understand how to
read an ARM template and then how to deploy it again.
I can generate an ARM template, but where do I go next?
I need to learn more. I need to dig deeper.
Take me on your journey. How did
you learn how to author ARM templates,
and how to actually use them properly?
>> Now, there are a few different ways to
go when you want to learn about arm templates.
For me, I learn by example.
I watch examples and I look through them and I
try to find out how it
works and what happens if I change something.
That's for me a great way to learn.
What you have available for that,
I can show you the Azure QuickStart templates,
and this is the GitHub repository where they are stored.
Here you have ARM template examples,
and there are a lot of examples.
This scroll is actually going too slow.
>> Thousands of examples.
It looks like that you can start with
some basic examples and build on top of them.
You pretty much have an example to start anywhere,
build on top of it and really build out your infrastructure.
>> Yeah. This is built by the community,
by a lot of people, all according to the best practices.
You see how many there are available that it will get pretty
close to your use case if you're talking examples.
>> That's really cool. We can deploy some resources,
we can export that template,
we can find some templates on GitHub.
That's awesome. But I still want to know how do I go further?
I really need to understand how to offer
these in the complexity of it,
because if I get a template out of GitHub,
great resource, but what if I need to modify it?
I'm really [inaudible] of how to understand how to do that,
and like what is it going to break,
or is it going to break my infrastructure?
Where did you go next in your journey?
>> Yeah. That's a bit of a risk from learning by example,
is that at one point or another,
you have something that's working but you don't
know why and you accept that,
but that also gives a problem that if it
stops working you probably still don't know why.
It is good that after you have
some feeling for the template and what everything is doing,
for me that's the time where I go into the documentation.
For a lot of people, this is the other way around,
this really depends on your own learning style.
But for me, this would be the point where I would
look at the Microsoft documentation.
For every template that is available there,
there is a reference for that template.
I see some basics here,
but if I look at that screen on the left, that menu,
these are all different kinds of resources
within Azure that you could use and you could click on.
You could click through and get all the information on how
that resource is structured and what you can find there.
If I look at a gateway,
I get a template format.
>> Very cool.
>> It shows me what I should fill
in for every property in a formats,
and there's a lot in this example.
>> There is. But application gateways are quite complex,
so that's a complex example,
but a good one because we use application gateways all the time.
No, that's really cool. You have
some documentation, how to get there.
Where did you go next on your learning journey?
How did you even get a bit further in that journey for you?
>> Well, at this point,
it starts becoming about tooling.
How are you going to write and really alter your own templates,
maybe even from scratch.
I wanted to show real quickly what
Visual Studio Code can do for you and
then especially the ARM Tools extension,
because it can basically generate that ARM template for you.
It's really impressive.
I have an empty JSON file here, called azuredeploy.json.
If I just click the A, it tells me it has a snippet available,
ARM with an exclamation point,
and if I click "Tap," I
get the basic structure of an ARM template.
>> Very cool.
>> I do not have to memorize all this,
it's all just there.
I can take that further.
Here in Resources, I would place
a resource and if I placed a hook,
it tells here that it has all these snippets available.
If I go to a storage account,
for example, this is
the basic context of what I need for a storage account.
>> Wow, okay, cool.
>> I could almost deploy this by this.
This gives you some great tooling to get
that feeling of what is actually necessary.
It gives you IntelliSense with it.
You can do it on a lower level where
it will auto-fill the properties for you.
It will tell you when some syntax is wrong,
so this can really help out once you're
ready to start with your own templates.
>> I agree. Your IDE is
so critical in helping you
get started with infrastructure as code,
because there's so many great built-in extensions to help you
author these things and help correct it.
When you do make a mistake,
it does pick it up and it does highlight it for you,
so that's really, really cool.
Tell me, how else did you learn ARM templates?
What other resources did you use?
>> There's one more that I would like to mention,
because we're throwing resources at you, and you might think,
"Well, now I have so many options,
I still don't know where to start," or maybe
you're still a bit confused about what your learning style is.
Then Microsoft Learn can come in very handy
because it can take you on that guide to get started.
I can show you in Microsoft Learn
and that you have a website here,
this is a web experience.
There's a lot of modules available where it has
a learning path specific for ARM templates.
It can walk through all these exercises and it gives
you some theory and then an exercise to do something.
You can get pretty far like deploy to multiple environments,
and it starts using what-if to test the ARM templates.
It takes you pretty far along
your journey while holding your hand a bit,
so you don't get lost on where am I going with this,
and I really like that mix between
the theory and doing it in practice,
there's a really good pace to it.
>> I like that worksheet from the beginning,
super basic stuff and to as
technically deep as you want to go with ARM templates,
so it's a great journey on Microsoft Learn.
>> Yeah.
>> Cool. Thank you so, so much Barbara.
Let's just recap this for a second,
because there are so many places to go on
your learning journey with ARM templates and we want to get
you from maybe not
knowing how ARM template structure to be able to deploy one.
We have the portal where we can just
extract and download our ARM template from a resource.
But then we can go a bit further and look at a lot
of Quickstart tutorials online.
We can start coding it in VSCode,
and the IDE helps us fill in the blanks, which is really cool.
We have MS Learn.
Barbara, thank you so,
so much today for coming on the show,
telling us about your journey and
it was so awesome to have you here today.
>> Thank you for having me.
>> Thank you for joining us for this episode
of the Azure Enablement show.
Now before you go, don't forget to like,
comment, share, and subscribe.
Join us next time for more episodes on the Azure Enablement show.
[MUSIC]