ARM Using Nested Templates | ARM Templates

Опубликовано: 18 Март 2026
на канале: Code Doge
275
3

#Azure #arm #devops #iac

  / codedoge4  

Github Link : https://github.com/jc566/Youtube_Solu...

Important Time Stamps:

00:00 - 01:13 = Context of what problems this video solves
01:13 - 02:03 = What features regarding ARM templates this video will cover
02:03 - 02:59 = Info about the Github links
02:59 - 03:25 = Context of how we will run the ARM templates in Visual Code
03:25 - 03:46 = View of what 2 resource groups we are going to use
03:46 - 05:10 = Deploying 00-ASP-Base or Base AppService Plan ARM Templates
05:10 - 05:22 = Confirmation of 00-ASP-Base deployment
05:22 - 07:20 = Deploying 00-Appservice-Base or Base Appservice ARM Template
07:20 - 08:04 = How to copy a resources Resource ID and view through JSON VIEW
08:04 - 08:35 = Confirming that 00-Appservice-Base is deployed
08:35 - 08:53 = Note that we are going to leave the resources running because we need the ASP to be present for future examples
08:53 - 11:05 = Deploying 01-ASP-in-Different-RG-but-Duplicate-ASP aka the ARM template that will deploy Appservice to target ASP in a different resource group BUT will also deploy a duplicate ASP in the current Resource Group
11:05 - 11:24 = Confirming and reviewing the results of 01-ASP-in-Different-RG-but-Duplicate-ASP deployment
11:24 - 13:18 = Breaking down what went wrong and why we have a duplicate ASP
13:18 - 13:41 = Head over to 17:17 if you want to go straight to Nested Template deployment
13:41 - 14:05 = Deleting duplicate ASP from 01-ASP-in-Different-RG-but-Duplicate-ASP
14:05 - 16:01 = Deploying 02-ASP-in-Different-RG-Use-Booleans aka using Boolean flags and conditions to skip a resource deployment in ARM. this is not the recommended fix
16:01 - 17:01 = Reviewing and confirming deployment of 02-ASP-in-Different-RG-Use-Booleans
17:01 - 17:17 = Reminder that using the boolean flag and condition is not the proper way to fix current scenario
17:17 - 20:58 = Using Nested Templates to deploy ASP to one resource group and appservices into another without any issues. This is the proper way to handle solution outside of using linked templates.
20:58 - 21:44 = Reviewing and confirming deployment of 03-ASP-in-Different-RG-Use-NestedTemplates
21:44 - 22:06 = Cleaning up resources in portal! Dont forget to save the money!
22:06 - 22:31 = Overview that we can handle this scenario with nested templates and/or Linked templates. Linked templates will be its own video.
22:31 - 24:00 = DOGE



Important Links :

Nested and Linked Templates Microsoft Documentation - https://learn.microsoft.com/en-us/azu...

ARM Template Functions - https://learn.microsoft.com/en-us/azu...


This video covers how you can used Nested Templates in Azure Resource Manager. It covers how you can deploy an AppService Plan into one resource group and then the appservices into another resource group in one template.

Keep in mind that this is not the only way to achieve this, you can also use Linked Templates.

In addition this video briefly covers a semi practical use of boolean parameters and conditions. It uses a bool parameter to control whether or not a certain part of the ARM template should be deployed or not by setting that to be conditional. This is obviously not a recommended approach since its just a bandaid and not well thought out. In the event you needed to deploy all of the resources for the first time such as a new environment deployment, you would be short changing your efforts since the ASP creation is technically still going to have the duplicate issue.

By using nested templates you can deploy the ASP into Resource Group 1 and then appservices to Resource Group 2. This is great because many companies or best practices may use a shared resource group or shared app service plan.

This video also shows how to view JSON VIEW and grab the resource ID for any resource.

I hope this video is informative and helpful!

Please ignore the following...

ARM Templates Nested Templates Linked Templates IAC Infrastructure as Code Terraform Using Shared ASP App Service Appservice App Service Plan Appservice Plan Shared Appservice Plan Shared Resource Group RG ARM Deployment AZ commands Parameters.json Template.json Examples Example Stackoverflow Just trying to get picked up in searches