Turn Your Vehicle Into a Smart Earning Asset

While youโ€™re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

๐Ÿš— You set the rental price
๐Ÿ” Secure bookings with verified renters
๐Ÿ“ Track your vehicle with GPS integration
๐Ÿ’ฐ Start earning within 48 hours

Join as a Partner Today

Itโ€™s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

Terraform Tutorials: What is terraform.tfvars with example

What is terraform.tfvars?

Terraform .tfvars files are used to store variable definitions. This allows you to externalize your variable definitions and makes it easier to manage them, especially if you have a large number of variables or need to use the same variables in multiple environments.

Terraform automatically loads all files in the current directory with the exact name terraform.tfvars or matching *.auto.tfvars. You can also use the -var-file flag to specify other files by name.

.tfvars files use syntax similar to Terraform configuration files (HCL), but they cannot contain configuration such as resource definitions. Like Terraform configuration files, .tfvars files can also contain JSON.

terraform.tfvars


# Content of terraform.tfvars
reponame = "terraform-var-terraform-tfvars"Code language: PHP (php)

terraform-var-terraform-tfvars.tf

Example of terraform.tfvars


# Example terraform.tfvars

# String Variable
string_variable = "Hello, Terraform!"

# Numeric Variables
integer_variable = 42
float_variable = 3.14

# Boolean Variable
boolean_variable = true

# List Variable
list_variable = ["item1", "item2", "item3"]

# Map Variable
map_variable = {
  key1 = "value1"
  key2 = "value2"
}

# Set Variable (Introduced in Terraform 0.14)
set_variable = ["itemA", "itemB", "itemC"]

# Tuple Variable (Introduced in Terraform 0.12)
tuple_variable = ["value1", 42, true]

# Object (Complex Type) Variable
object_variable = {
  name = "John Doe"
  age = 30
  is_employee = true
}

# Optional Variable (for conditional use)
optional_variable = null
Code language: PHP (php)

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.