3.5 Linked ARM Templates

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Course
Time
1 hour 19 minutes
Difficulty
Beginner
Video Transcription
00:01
now what are linked? Adam Templates And why do you wanna use them? As we mentioned in the previous video,
00:08
you may wanna actually overcome some of the limitation of the arm templates. For that you may need to use linked on templates. But also, from organizational point of view, you may want to split the development of different arm templates between different teams or people.
00:24
Let's see how this work.
00:28
Imagine that you have already developed a template to deport your virtual network.
00:34
This is a stand alone template with these parameters,
00:38
variables and the resource. Is that the point?
00:41
Very simple. One.
00:44
If you would like to reuse this template in some other department
00:48
where you'll need to deform not only the virtual network but other resource is
00:54
you can link this template from a master template.
00:58
Is it the point? A virtual network resourced? Oh, you need to deploy or create the resource of type deployment.
01:07
So you see that the type is Microsoft or three sources large deployment, which is the resource identifier you name. This resource is nested veena template,
01:19
and you are a link to the template. Very often, those templates can be applauded in blob storage. So you can other Ling Tau, the blob location where the template is
01:30
as well as you can. Other link tow the para matters
01:34
file that you can be used with this template.
01:38
You can also add in line parameters if you instead, the perimeter slink, you are a parameters
01:46
put up out of here
01:49
in song.
01:53
However, linking templates is not the only option. You can also embed templates inside.
02:00
Here Is we embedded the creation of the storage account in the master template
02:07
again east it creating a storage account. We create a deployment.
02:10
And in the properties of the department, we have the actual template where the storage account is created.
02:17
This is the same structure that we used in our initial template when we started writing it.
02:24
They're certain benefits to linking to external templates than embedding them, but nevertheless you have both options.
02:32
Now let's talk about the deployment most that you can see we used in both linked and the embedded templates
02:44
actual resource manager Thio supports to deployment. Moz, the first is called complete more in a complete mother. Actual resource manager deletes all the resources that exist in the resource group,
02:58
but I don't specified in the template.
03:00
What that means is, if you have a resource group that he has, some resource is inside. Let's say you have already storage account or virtual machine there, and your deploy a new template in that resource group that here's a complete deployment month.
03:16
The existing storage account and virtual machine will be deleted before the new resource is sort of the point.
03:24
The other deployment modus called incremental moat in ink in incremental model resource manager leaves and changed. The resource is that exists in the resource group but aren't specified in the template,
03:38
taking our previous example where we hear the storage account in virtual machine in the resource group. If we do a incremental, more deployment in the template, then the new resources will be other. In addition to the existing ones in the resource group,
03:55
let's once again the review. What are the benefits of the linked templates?
04:01
The 1st 1 is, of course,
04:03
toe overcome the arm template limitations.
04:08
The two important limits that you need toe take care off us are the length of the template as well. What's the number of resource is you can deploy.
04:16
Let's say you wanted the boy 1000. Resource is you cannot do this with the single arm template because you're limited to only 803 sources.
04:28
This includes also resources that are created in cycles. Let's say you want to create virtual machines that are identical, but 10 or 20 of those.
04:39
If you have this cycle or loop in the arm template,
04:45
this count store towers the overall limit off 803 sources. In order to do this type of deployment, you need to use multiple templates that are linked to each other.
04:57
Another benefit of the link templates is that you can store the templates in central repositories and just link from new master templates. Toe does existing templates.
05:10
An example of such central depository can be a storage account.
05:15
Very similar benefit is when you want to go unattended deployments.
05:19
So if you're if you care for central depository for all the templates you can use, service is like azure automation or actual develops toe. Pull the templates from those central repositories and do that unattended or automated deployments.
05:36
Also, you can link to 1/3 party templates.
05:41
There many templates that you can find on get up and reusing your own templates.
05:48
So we saw in this video how we can use link templates to make our arm templates more flexible and reusable. Let's summarize the whole model.
Up Next