Using for_each in Terraform to Create Multiple Unique Azure VMs | Map of Objects
HTML-код
- Опубликовано: 9 фев 2025
- How to use the terraform meta-argument for_each to create multiple terraform resources with unique values. In this video we will create multiple Azure Linux VMs using for_each and a map of objects.
This is the best real time example I have seen so far. u got me subscribed!! Thank you!!
Great tutorial, straightforward to the point
Great! Thank you!
Well explained!! Is there any repositories which have all these configuration files to refer in one go?
Hi, if suppose i want to create 20+ VMs and I want to name each nic with vm hostname and that nic should associate with respective vms . then How can I go with map(object) variable ?
Hello,
i have stuck for some time on a problem, i using your script and is working fine, thank a lot for that, now im trying to modify and add multipe data disk on the vm with different sizes, live VM1 has 2 disk ,20gb and 30gb, vm2 had 10gb and 20 gb. but until now i have failed to create them. can you please help me with that?
Do you have a link to a repository with the code you’re working on I can look at?
how to scale this to 100 vms? or a dynamic no. of vms?
@The_Sudo Hello, Can you please push the code into a repo and provide the link.
What if i want to import vm_map values from json file?
You should use Azure Key Vault for storing passwords, even creating password using terraform leaves it in state.
Totally! 1 concept at a time 😂
@@TheSudo Great video, as far as using keyvault, is it even possible using map as doesnt seem to like having variables in he map object
hai sir can you provide code for this video to practice
Hi, can you provide us your code in this video?