Wow! The video was very comprehensive and I've walked away with actually understanding the subject; massive applause! I'll be tuning in more often now; thanks for taking the time and posting this high quality content! 🙏🏼
Thanks, man!! you saved my day!! I was trying to create a JSON file for my ECS Docker Container Definition and this looping thing was killing me / blocking me to write a more dynamic JSON file based on the values passed in. This video is really helped me a lot. I am going to try templatefile function. Thanks again!
Man, what you do is just awesome. It's the second time you publish a video spot on, for my current work. I just finished a vault on ACI project (although I did it full terraform) a few weeks ago, and now that I'm working on templating a fortigate vm configuration file, you bring me the comparison between template_file and templatefile() on a plate. I can't thank you enough. :)
great video! I'd be really interested to see something showing cross-root module variable sharing. if that doesn't make sense let me know - I'll clarify!
You can create providers dynamically using templates but I you need to apply twice, since first you generate the TF file, then you can execute it. I'm not sure if there is any way to do it in one apply, that's what I'm looking for right now.
Hey Ned, Actually for templatefile I don't want to use local.tf instead I want to load variable values directly in main.tf file before executing it like variable should get load through ${mystring} through linux machine and not from any of the terraform variable file like variable.tf or any other method of setting variables in terraform. If you know for yaml we can do this using gomplate(it's a rendering utility which yaml, json, hashicorp vault supports). Is there any way or any rendering utility available using that I can load the variable value in main.tf file and once all the values are loaded inside it then I should able to execute this main.tf file.
@Ned in the Cloud Hi Ned, what is the use case for this templatefile if you take say Azure Cloud as an example. It would be great if you can let me know the usecase of this templatefile function.
I tend to use the templatefile function to dynamically generate custom_data for an Azure VM. For instance, I use it in this example: github.com/ned1313/terraform-tuesdays/tree/master/2021-03-09-Consul-Terraform-Sync/environment You could skip using a templatefile function and do it all in-line with heredoc syntax. Personally, I like to break it out into its own file.
Wow! The video was very comprehensive and I've walked away with actually understanding the subject; massive applause!
I'll be tuning in more often now; thanks for taking the time and posting this high quality content! 🙏🏼
Thanks for teaching us....Regards from Argentina!
Thanks, man!! you saved my day!! I was trying to create a JSON file for my ECS Docker Container Definition and this looping thing was killing me / blocking me to write a more dynamic JSON file based on the values passed in. This video is really helped me a lot. I am going to try templatefile function. Thanks again!
Man, what you do is just awesome.
It's the second time you publish a video spot on, for my current work. I just finished a vault on ACI project (although I did it full terraform) a few weeks ago, and now that I'm working on templating a fortigate vm configuration file, you bring me the comparison between template_file and templatefile() on a plate.
I can't thank you enough. :)
Glad I could help!
Such an awesome video, saved me hours of writing template_file
Glad it helped!
Thank you Ned! Just what I was looking for...
Glad I could help!
nice one! thanks ned!
Hey! Very cool video! Love your style!
Great content man..
2:21 video start
Thanks for the tutorial. Very helpful!
Nice Presentation and Explanation!!
Cool..Nice one as usual👍
Brilliant !
great video! I'd be really interested to see something showing cross-root module variable sharing. if that doesn't make sense let me know - I'll clarify!
Would it be possible to create providers dynamically using templatefile? I.e. depending on data create an azurerm providers for each subscription_id
You can create providers dynamically using templates but I you need to apply twice, since first you generate the TF file, then you can execute it. I'm not sure if there is any way to do it in one apply, that's what I'm looking for right now.
Hello,
How save output in file? just > filename?
Or some plugin can make file with output with template what I want?
Hey Ned, Actually for templatefile I don't want to use local.tf instead I want to load variable values directly in main.tf file before executing it like variable should get load through ${mystring} through linux machine and not from any of the terraform variable file like variable.tf or any other method of setting variables in terraform. If you know for yaml we can do this using gomplate(it's a rendering utility which yaml, json, hashicorp vault supports). Is there any way or any rendering utility available using that I can load the variable value in main.tf file and once all the values are loaded inside it then I should able to execute this main.tf file.
@Ned in the Cloud Hi Ned, what is the use case for this templatefile if you take say Azure Cloud as an example. It would be great if you can let me know the usecase of this templatefile function.
I tend to use the templatefile function to dynamically generate custom_data for an Azure VM. For instance, I use it in this example: github.com/ned1313/terraform-tuesdays/tree/master/2021-03-09-Consul-Terraform-Sync/environment
You could skip using a templatefile function and do it all in-line with heredoc syntax. Personally, I like to break it out into its own file.
Hi, it's me from the future, here to report that Hashicorp has in fact deprecated the "template_file" plugin.
🎊🎊🕺🪩
Nice. 👌 template_file is no longer supported
Is that official? I thought it was just archived but still available. Regardless, don't use it!