What file extension do Terraform configuration files use?

Master the HashiCorp Terraform Test with these flashcards and multiple choice questions. Each question includes hints and explanations to prepare you effectively. Set yourself up for success!

Terraform configuration files primarily use the .tf file extension. This extension indicates that the file contains configurations or definitions that Terraform will use to manage infrastructure. These configurations are typically written in HashiCorp Configuration Language (HCL), which is designed to be human-readable and machine-friendly, making it easier to define infrastructure as code.

While the .tfconfig and .hcl extensions relate to Terraform, they serve different purposes. The .tfconfig extension is not widely recognized as a standard for configuration files in Terraform, and .hcl is more commonly associated with HCL files that may not necessarily be specific to Terraform configurations. The .tfvars extension is used for variable definition files, allowing users to specify variable values separately from the main configuration files.

Using the .tf extension is essential for the Terraform CLI to recognize configuration files, enabling users to plan, apply, and manage infrastructure resources effectively.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy