You are currently viewing Terraform Variable File

Terraform Variable File

Terraform Variable File

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed terraform variables.

https://cloudaffaire.com/terraform-variables/

In this blog post, we will discuss terraform variable file.

What is Terraform variable file?

Values for the input variables of a root module can be gathered in variable definition files and passed together using the -var-file=FILE option. For all files which match terraform.tfvars or *.auto.tfvars present in the current directory, Terraform automatically loads them to populate variables. If the file is located somewhere else, you can pass the path to the file using the -var-file flag. It is recommended to name such files with names ending in .tfvars.

Variable file demo:

Hope you have enjoyed this article. In the next blog post, we will discuss terraform data source.

To get more details on terraform, please refer below terraform documentation

https://www.terraform.io/docs/index.html

 

Leave a Reply