Skip to content

Terraform Input Variables using .auto.tfvars

Step-01: Introduction

  • Provide Input Variables using auto.tfvars files

Step-02: Auto load input variables with .auto.tfvars files

  • We will create a file with extension as .auto.tfvars.
  • With this extension, whatever may be the file name, the variables inside these files will be auto loaded during terraform plan or apply
    # Initialize Terraform
    terraform init
    
    # Validate Terraform configuration files
    terraform validate
    
    # Format Terraform configuration files
    terraform fmt
    
    # Review the terraform plan
    terraform plan 
    

References

🎉 New Course
Ultimate DevOps Real-World Project Implementation on AWS
$15.99 $84.99 81% OFF
MARCH2026
Enroll Now on Udemy →
🎉 Offer