CV0-004 Deployment Practice Question
A cloud engineer is writing a Terraform configuration to deploy an AWS EC2 instance. Which file extension is typically used for Terraform configuration files written in HCL?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
.tf
Terraform uses the .tf extension for HCL configuration files.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
.yaml
Why it's wrong here
YAML is used in CloudFormation or Ansible, not Terraform.
- ✓
.tf
Why this is correct
.tf is the correct extension for Terraform HCL files.
- ✗
.json
Why it's wrong here
JSON can be used but .tf is the standard HCL extension.
- ✗
.hcl
Why it's wrong here
Although HCL stands for HashiCorp Configuration Language, the actual file extension is .tf.
Go deeper
Related to this question
About these practice questions
This CV0-004 question is part of Courseiva's 977-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.