Hands-on task
Terraform: file from a template
In /root/tf, use the templatefile function to generate /opt/render/greeting.txt, substituting the variable name = "IzzyLab" into the template so the result is the string Hello, IzzyLab. Run apply. There's no internet in the sandbox: only the hashicorp/local provider is available (it sits in a local mirror, terraform init will find it on its own). Write the config in the Editor tab (the /root/tf directory is already created) and run terraform in the terminal.
- terraform
- templatefile
- tftpl templates
- path.module
- local_file