DEV Community

Rahul Wagh
Rahul Wagh

Posted on • Originally published at jhooq.com

Terraform variable.tf | terraform.tfvars | Terraform command line variables

Terraform is OpenSource infrastructure as a code software tool. With the help of Terraform you can provision infrastructure on cloud platform such AWS(https://aws.amazon.com/), Google Cloud(https://cloud.google.com/), Azure(https://azure.microsoft.com/en-us/), DigitalOcean(https://www.digitalocean.com/), OpenShift(https://www.openshift.com/) and many more...cloud provider

But before you start working with Terraform you must understand different types of variables provided by the terraform -

  1. variable.tf - This file is used for declaring and defining variables
  2. terraform.tfvars - It is also used for declaring and defining variables but can be used for multiple environment like staging, production
  3. commandline vars - If you want to pass the variable using terraform commandline

Top comments (0)