template_file

    0

    0

    lucycodes42

    Terraform snippets

    The code creates a template file called "init.tpl" in the same directory as the code that loads it. The template file has the following content:

    <div class="row"> <div class="col-md-12 col-sm-12"> <h1>${title}</h1> </div> <div class="col-md-12 col-sm-12"> ${data.

    Shortcut: tf_template_file

    data "template_file" "${init}" {
       template = "\${file("\${path.module}/${init}.tpl")}"
    
       vars {
           consul_address = "\${aws_instance.consul.private_ip}"
       }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.