Thanks heaps for this tutorial. My two cents. You must supply output (rg_name_out) to storage account module block in root module to establish the dependacy of stroage ac module on rg module. If you just hard code rg name in root module you will get 404 (resource rg not found error) because terraform cant establish the link between storage and rg resource
thank you for a lovely video. really appreciate it! One question though, what happens if we repeatedly run the code with terraform apply, wouldn't it create multiple storage accounts as the random module would generate a new string every time we run the code, which is not intended?
I wasted all my day trying to understand how to pass outputs between child and parent and the only thing i should have done was watch this video! Dozens of tutorials and videos and no one has explained this like you have! Congrats!!!
Thank you for showing a simple example of how to consume an output variable from a module! Your demos are great - you keep the code simple and to the point - thank you!!
Travis, a couple of things: 1. How do I import something... a service principal, for instance. 2. What if I had to cancel an apply because it just kept running and running.
Very helpful video. If we do a for-each over a map inside the main.tf in root path to create 2 storage group then in that case how do we write the output file . I am getting an error as follows. Could you kindly help. │ │ module.resources is object with 2 attributes │ │ This object does not have an attribute named "stg_account_name".
How to use the data source block .... On modules My task is I have resources group existing now am trying to add resources under that resources group .... How can I achive this ? I want to add storage account on the resources group that is already existing ... Created manually. Folder structure : Dev Main tf Test Main.tf Modules Resources group Main.tf Var.tf Storage account
I have been tasked with creating dozens, if not hundreds, of new site listeners, rules, probes, etc. in Application Gateway in the coming months. Is terraform the best approach, or are there better solutions for rapid scale out deployment? I currently have PowerShell scripts that work perfectly for a one-off site. Thanks, Tim
Hi Travis, sorry for the noob question. I'm curious why the variables base_name and location are duplicated in two modules StorageAccount and ResourceGroup. Can you expand on that?
Hail Traveler. If you are looking for the clearest explanation and demonstration of passing generated values between modules, then you’ve found it. This video prevented me from nigh on jumping off the roof! The documentation is not fantastic on this subject (module composition), and even with this crystal clear explanation, it’s still likely to result in some experimentation before everything clicks into place. Thank you for making this.