ARM Templates Copy Loops | Create multiple instances of resources, properties and variables

  Рет қаралды 21,690

Adam Marczak - Azure for Everyone

Adam Marczak - Azure for Everyone

Күн бұрын

With Copy Elements you can deploy multiple instances of your resources or properties, all in a single Resource Manager template.
In this episode I give you introduction to instance multiplication using copy elements and show you practical examples of applying this practice for resources, properties, parameters, variables and outputs.
Source code for demos: github.com/MarczakIO/azure4ev...
In this episode live demo of
- Deploying multiple Storage Accounts
- Deploying multiple Storage Accounts using parameters
- Creating dependencies
- Deploying multiple child resources
- Creating array variables using copy element
- Creating array outputs using copy element
- Creating resource properties using copy element
Next steps for you after watching the video
1. Multiple resources docs
- docs.microsoft.com/en-us/azur...
2. Multiple properties docs
- docs.microsoft.com/en-us/azur...
3. Multiple variables docs
- docs.microsoft.com/en-us/azur...
4. Multiple outputs docs
- docs.microsoft.com/en-us/azur...
5. Multiple instances of resource docs
- docs.microsoft.com/en-us/azur...
Want to connect?
- Blog marczak.io/
- Twitter / marczakio
- Facebook / marczakio
- LinkedIn / adam-marczak
- Site azure4everyone.com

Пікірлер: 44
@volfram1
@volfram1 Жыл бұрын
Thank you Adam for the content. There are a lot of object-oriented programming concepts here. I don't know about others but those long strings are killing me. When I finish reading them I almost forget what were they doing in the first place.
2 жыл бұрын
A big thanks to you for these. Great content with great examples!
@gajulanavateja678
@gajulanavateja678 4 жыл бұрын
Thanks a ton for making all these videos, it helps so many folks and students who cannot effort to buy online courses. Thanks again.
@AdamMarczakYT
@AdamMarczakYT 4 жыл бұрын
You're very welcome!
@stevelee4958
@stevelee4958 4 жыл бұрын
Thanks so much for sharing this. Really helpful.
@AdamMarczakYT
@AdamMarczakYT 4 жыл бұрын
Thank you! 😁
@muthukumarshanmugasundaram8360
@muthukumarshanmugasundaram8360 2 жыл бұрын
Good Video @Adam. Perfectly expalined
@Devotionalandhealthylife
@Devotionalandhealthylife Жыл бұрын
Great tutorial thankyou for clear explanation adam
@pankajiae1978
@pankajiae1978 2 жыл бұрын
Good details
@humanbot5247
@humanbot5247 3 жыл бұрын
Amazing ! ! !
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Thank you! Cheers!
@TheRockportcity
@TheRockportcity 3 жыл бұрын
You are the KING of ARM !! Keep up the good work mahn and thank you for taking time out and creating something useful for the community.
@vipullende
@vipullende 3 жыл бұрын
Thank you so much for the Video Adam, its very helpful. Could you please also create a video on creating multiple VM using a ARM template and Loop.
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Thanks for the kind words. Unfortunately this scenario is not much different from copying multiple storage account. It is surely more complex because there are more components required for a VM but the technical knowledge required is the same. Since it doesn't require a new skill set I'm not sure if it constitutes a separate video. Thanks for the suggestion though. Keep up the good work!
@pkz001
@pkz001 3 жыл бұрын
@@AdamMarczakYT Thanks for the video. even i had similar question but i guess i need to learn a bit more and apply the info from this video for multi VM deployment.
@ViktorPonomarov
@ViktorPonomarov 5 ай бұрын
👍
@nabilgremny9344
@nabilgremny9344 2 жыл бұрын
Thank you for this great resource. I have a question about Disaster recovery, what is the best method to replicate all the infrastructure (vnet, subnet, disks, vm, etc ) instead of jus replicating VMs? Thanks a lot
@nareshg-vq6gp
@nareshg-vq6gp Жыл бұрын
Hi Adam, Really appreciated your video, I have one doubt, how container names comes container1,container2..., we have added the concadination with "Storage",uniquestring, as well right ??
@songangte29
@songangte29 3 жыл бұрын
Thank you so much for this Adam, very helpful. I have a question: Instead of using functions to generate names, what if I have a static set of names I already have, like storage-germany, storage-india... storage-singapore .. many names in array? How do i specify these in an array or object?
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
This was shown as one of the demos in the video. Did you watch it entirely?
@GustavoMartinezgusmb
@GustavoMartinezgusmb 3 жыл бұрын
Hi Adam, great examples. I am trying to get around creating load balancing rules on a MLB, using copy loops for that property (loadBalancingRules). I have a variable (numApplications) and for each application I must create 2 rules (http_access_appx and https_access_appx). With copy loops I am able to create one of the rules for all applications, but having trouble to create both rules, as I cannot use the copy loops multiple times inside the same resource... How would you recommend doing this? Thanks, and congrats for the great tutorials
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Hey, thanks! If you always create only 2 rules then why use copy loops in the first place :) but if you really insist check my response on reddit on similar example www.reddit.com/r/AZURE/comments/fkxlbs/nested_arm_template_with_copy/
@GustavoMartinezgusmb
@GustavoMartinezgusmb 3 жыл бұрын
@@AdamMarczakYT thanks Adam! I think modulo function gives me an idea of how to solve it, awesome:) I have to use loops because the it depends on number of applications. If this number is 20, I am creating 40 loadBalancingRules in one go (20 for http and 20 for https). Cheers
@ahmadmasalhags6428
@ahmadmasalhags6428 Жыл бұрын
What about nested copy? I need to deploy a Pipelines of Azure Data Factory. Each pipeline has its own array of "source endpoints", with different lengths. So not only I need to iterate over the pipelines, I need to iterate over each "source endpoint" it has. Anyway to do this?
@morrigandeep1313
@morrigandeep1313 4 жыл бұрын
the best explanation as always, sorry but in the min 5:48 the value of the second object need to be value1 instead of value2 right?
@AdamMarczakYT
@AdamMarczakYT 4 жыл бұрын
Correct, a small typo! Good catch :)
@zohaibzafar7378
@zohaibzafar7378 2 жыл бұрын
Hi, Question: i create 2 VMs with a name using instance count and VMs 1 and 2 created,,, fine . but when I run the template again with same VM name it should start the VM name from 3,4 ... as I have already created VMs 1 and 2 in earlier run... please advise?
@chandrashekhar2461
@chandrashekhar2461 3 жыл бұрын
Thank you so much ...how can we create multiple subnets inside Vnet using above?
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Create a subnet resource and use copy look to multiply it. It's a bit trickier because you need to generate address spaces properly github.com/Azure/azure-quickstart-templates/blob/master/101-vnet-two-subnets/azuredeploy.json
@DureSameen
@DureSameen 3 жыл бұрын
Very detailed and nice content, do you have a course on Pluralsight or Udemy?
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
No, sorry, all my content is free and available on YT :)
@DureSameen
@DureSameen 3 жыл бұрын
@@AdamMarczakYT This is simply great, can you please do a video on Azure bicep language. it would be very good help.
@nero787
@nero787 2 жыл бұрын
Do you have an example like this but with Azure vms?
@mrityunjayanaik3617
@mrityunjayanaik3617 2 жыл бұрын
I'm trying to generate the ARM template for ADF migration but every time its creating 2 files in which json is randomly split between 2 files withn names ARM_0.json and ARM_1.json. How to create a single file?
@mooncake4511
@mooncake4511 3 жыл бұрын
Can I use copy to loop over an array for access policies in keyvaults ?
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Yep :) stackoverflow.com/questions/53323560/looping-through-values-in-arm-templates
@LencoTB
@LencoTB 3 жыл бұрын
How would one get the storage queue endpoints? I have tried this: "storageQueueNames": { "type": "array", "copy": { "count": "[length(parameters('storageQueueNames'))]", "input": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('storage_account_name'), '/default'), copyIndex('copyQueues')).primaryEndpoints.queue]" } }
@LencoTB
@LencoTB 3 жыл бұрын
What I meant to say, if I have used your example 04-storage-child-resources.json and created storage queues instead of blobContainers, then how would I ouput these queue endpoint in the outputs section?
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
Hey, there are few examples here. You are almost done, your resourceid might be incorrect. docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#reference-example
@gajulanavateja678
@gajulanavateja678 4 жыл бұрын
Can you make videos on Azure CDN, please
@AdamMarczakYT
@AdamMarczakYT 4 жыл бұрын
I will definitely cover CDN. But there are so many more common/cool services on the list. Like synapse analytics, api management, log analytics and KQL, cognitive services, etc. But CDN will eventually get here.
@abdulthakur5608
@abdulthakur5608 3 жыл бұрын
feel sad, such amazing video only has 3k view and a video with a girl in bikini would have 3 million view, hahahha, its a joke
@AdamMarczakYT
@AdamMarczakYT 3 жыл бұрын
hehe, thanks :)
@shubhamkumar_noob_cs-go_pl581
@shubhamkumar_noob_cs-go_pl581 11 ай бұрын
Not explained properly at all.
ARM Templates Conditional Deployments
15:19
Adam Marczak - Azure for Everyone
Рет қаралды 10 М.
ARM Templates Modularization using Nested and Linked Templates
31:52
Adam Marczak - Azure for Everyone
Рет қаралды 19 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 36 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,9 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
ARM Templates Parametrization | Expressions, Parameters and Variables
27:02
Adam Marczak - Azure for Everyone
Рет қаралды 42 М.
ARM Template Masterclass Episode 8: Loops
11:17
Sam Cogan
Рет қаралды 1,5 М.
Azure Table Storage Tutorial | Easy and scalable NoSQL database
22:51
Adam Marczak - Azure for Everyone
Рет қаралды 89 М.
ARM Templates Parameter Files | Pass your parameters like a pro
13:24
Adam Marczak - Azure for Everyone
Рет қаралды 30 М.
ARM Templates Orchestration | Set deployment order and pull resource information
22:37
Adam Marczak - Azure for Everyone
Рет қаралды 19 М.
Arm Template Masterclass Episode 3: Parameters and Variables
15:09
Azure Load Balancer Tutorial
19:48
Adam Marczak - Azure for Everyone
Рет қаралды 108 М.
Azure Application Insights Tutorial | Amazing telemetry service
34:26
Adam Marczak - Azure for Everyone
Рет қаралды 236 М.
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 6 МЛН
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1,2 МЛН
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 5 МЛН