template_file inline

    0

    0

    lucycodes42

    Terraform snippets

    This code sets the template to be "template_file/consul_address:1234" and sets the variables consul_address and port to be the private IP address of the AWS instance running Consul and 1234, respectively.

    Shortcut: tf_template_file_inline

    data "template_file" "${init}" {
       template = "\$\${consul_address}:1234"
       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.