Which file extension is commonly used for Terraform files?

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 files are commonly saved with a .tf file extension. This extension indicates that the file contains configuration code written in HashiCorp Configuration Language (HCL), which is specifically designed for infrastructure as code. HCL allows users to define infrastructure in a way that is both human-readable and machine-friendly, making it easier to manage and understand configurations.

Using the .tf file extension helps tools and developers recognize that these files contain valid Terraform configurations and can be processed by the Terraform CLI for infrastructure provisioning. Each .tf file can represent different components of the infrastructure, such as variables, outputs, and resource definitions, contributing to organized and modular configurations.

The other options present file extensions typically associated with other technologies or data formats: .json is commonly used for data interchange; .yaml is often utilized in configuration files, particularly for applications like Kubernetes; and .config may be linked to various application-specific configuration files. Thus, the use of .tf is distinctly aligned with Terraform and its infrastructure as code practices.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy