Using templatefile in Terraform

แชร์
ฝัง

ความคิดเห็น • 28

  • @pur3D3votion
    @pur3D3votion 2 ปีที่แล้ว +1

    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! 🙏🏼

  • @nathanaelfrappart711
    @nathanaelfrappart711 3 ปีที่แล้ว +1

    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. :)

  • @87rushi
    @87rushi 3 ปีที่แล้ว +2

    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!

  • @hectordelarosa1711
    @hectordelarosa1711 3 ปีที่แล้ว +1

    Such an awesome video, saved me hours of writing template_file

  • @FaidonPassias
    @FaidonPassias 2 ปีที่แล้ว

    Hey! Very cool video! Love your style!

  • @mymd2004
    @mymd2004 6 หลายเดือนก่อน

    Thanks for teaching us....Regards from Argentina!

  • @KoljaMineralka
    @KoljaMineralka 3 ปีที่แล้ว +1

    Thank you Ned! Just what I was looking for...

  • @itsalushta
    @itsalushta 3 ปีที่แล้ว

    Hello,
    How save output in file? just > filename?
    Or some plugin can make file with output with template what I want?

  • @snitkjaer
    @snitkjaer 2 ปีที่แล้ว +1

    Would it be possible to create providers dynamically using templatefile? I.e. depending on data create an azurerm providers for each subscription_id

    • @shekelboi
      @shekelboi ปีที่แล้ว

      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.

  • @kingsadmin
    @kingsadmin 3 ปีที่แล้ว +1

    nice one! thanks ned!

  • @krunalshah2484
    @krunalshah2484 3 ปีที่แล้ว

    Nice Presentation and Explanation!!

  • @Manishkumar-zj9zw
    @Manishkumar-zj9zw 3 ปีที่แล้ว +2

    Great content man..

  • @akshaylavhale2172
    @akshaylavhale2172 3 ปีที่แล้ว

    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.

  • @pallabkolkata
    @pallabkolkata 3 ปีที่แล้ว

    @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.

    • @NedintheCloud
      @NedintheCloud  3 ปีที่แล้ว

      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.

  • @saneejmc
    @saneejmc 3 ปีที่แล้ว +1

    Cool..Nice one as usual👍

  • @ApoorvaGarg0308
    @ApoorvaGarg0308 3 ปีที่แล้ว

    Thanks for the tutorial. Very helpful!

  • @longb1913
    @longb1913 3 ปีที่แล้ว +1

    2:21 video start

  • @nathanbenton2051
    @nathanbenton2051 3 ปีที่แล้ว

    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!

  • @tuipo5
    @tuipo5 3 ปีที่แล้ว

    Brilliant !

  • @premierde
    @premierde 9 หลายเดือนก่อน

    Nice. 👌 template_file is no longer supported

    • @NedintheCloud
      @NedintheCloud  9 หลายเดือนก่อน

      Is that official? I thought it was just archived but still available. Regardless, don't use it!

  • @DallasGraves
    @DallasGraves ปีที่แล้ว

    Hi, it's me from the future, here to report that Hashicorp has in fact deprecated the "template_file" plugin.