Using templatefile in Terraform

Поділитися
Вставка
  • Опубліковано 28 сер 2024

КОМЕНТАРІ • 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! 🙏🏼

  • @mymd2004
    @mymd2004 Місяць тому

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

  • @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!

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

  • @hectordelarosa1711
    @hectordelarosa1711 3 роки тому +1

    Such an awesome video, saved me hours of writing template_file

  • @KoljaMineralka
    @KoljaMineralka 3 роки тому +1

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

  • @kingsadmin
    @kingsadmin 3 роки тому +1

    nice one! thanks ned!

  • @FaidonPassias
    @FaidonPassias Рік тому

    Hey! Very cool video! Love your style!

  • @Manishkumar-zj9zw
    @Manishkumar-zj9zw 3 роки тому +2

    Great content man..

  • @longb1913
    @longb1913 2 роки тому +1

    2:21 video start

  • @ApoorvaGarg0308
    @ApoorvaGarg0308 3 роки тому

    Thanks for the tutorial. Very helpful!

  • @krunalshah2484
    @krunalshah2484 2 роки тому

    Nice Presentation and Explanation!!

  • @saneejmc
    @saneejmc 3 роки тому +1

    Cool..Nice one as usual👍

  • @tuipo5
    @tuipo5 2 роки тому

    Brilliant !

  • @nathanbenton2051
    @nathanbenton2051 2 роки тому

    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!

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

  • @itsalushta
    @itsalushta 2 роки тому

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

  • @akshaylavhale2172
    @akshaylavhale2172 2 роки тому

    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.

  • @DallasGraves
    @DallasGraves 11 місяців тому

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

  • @premierde
    @premierde 4 місяці тому

    Nice. 👌 template_file is no longer supported

    • @NedintheCloud
      @NedintheCloud  4 місяці тому

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