Set 1 - Terraform Hashicorp Terraform Associate 003 Mock Test
Terraform Hashicorp Terraform Associate 003 Practice Test - Set 1
Test your knowledge with this Terraform Hashicorp Terraform Associate 003 mock exam. Get real-world IT questions and prepare for certification success.
Terraform Associate 003: HashiCorp Certified Terraform Associate - Exam Information
2. Which language is used for writing Terraform configuration files?
HCL
YAML
JSON
XML
✅ Correct Answer: HCL
3. What is the primary command to initialize a new Terraform working directory?
terraform init
terraform apply
terraform plan
terraform refresh
✅ Correct Answer: terraform init
4. Which Terraform command is used to preview changes before applying them?
terraform plan
terraform apply
terraform validate
terraform fmt
✅ Correct Answer: terraform plan
5. How does Terraform manage infrastructure state?
Using a state file
By communicating with cloud providers directly
By storing configurations in a database
By using Kubernetes
✅ Correct Answer: Using a state file
6. Which backend type does Terraform support for storing state?
S3
Kafka
Redis
MongoDB
✅ Correct Answer: S3
7. What is the purpose of the "terraform validate" command?
To check for syntax errors in the configuration
To apply the Terraform configuration
To initialize Terraform plugins
To remove unused resources
✅ Correct Answer: To check for syntax errors in the configuration
8. Which file should be ignored in version control when using Terraform?
terraform.tfstate
main.tf
variables.tf
outputs.tf
✅ Correct Answer: terraform.tfstate
9. What is the default provider for Terraform if none is specified?
There is no default provider
AWS
Google Cloud
Azure
✅ Correct Answer: There is no default provider
10. Which Terraform block is used to define reusable infrastructure components?
module
variable
resource
output
✅ Correct Answer: module
11. How does Terraform handle changes in infrastructure?
It plans and applies incremental changes
It destroys everything and recreates from scratch
It updates only new resources, ignoring changes
It requires manual intervention for all changes
✅ Correct Answer: It plans and applies incremental changes
12. Which Terraform command is used to remove infrastructure managed by Terraform?
terraform destroy
terraform apply --destroy
terraform remove
terraform rollback
✅ Correct Answer: terraform destroy
13. How can you pass variables to a Terraform configuration?
Using a .tfvars file
By embedding values in main.tf
By modifying the terraform binary
By writing values in terraform.tfstate
✅ Correct Answer: Using a .tfvars file
14. What is the main benefit of using remote state storage in Terraform?
Collaboration and consistency across teams
Faster execution of Terraform plans
Improved debugging
Reduced Terraform file size
✅ Correct Answer: Collaboration and consistency across teams
15. What is a provider in Terraform?
A plugin that interacts with APIs to manage resources
A configuration file
A security mechanism
A storage backend
✅ Correct Answer: A plugin that interacts with APIs to manage resources
16. What is the purpose of the Terraform "output" block?
To display values from Terraform configurations
To define external dependencies
To store intermediate data
To override variable values
✅ Correct Answer: To display values from Terraform configurations
17. Which command is used to install required providers and modules in Terraform?
terraform init
terraform get
terraform fetch
terraform install
✅ Correct Answer: terraform init
18. What happens if you run "terraform apply" without running "terraform plan" first?
Terraform will apply changes directly
Terraform will fail
Terraform will always ask for confirmation
Terraform will rollback previous changes
✅ Correct Answer: Terraform will apply changes directly
19. How does Terraform handle dependencies between resources?
By automatically determining dependencies
By requiring explicit dependency declarations
By always creating resources in parallel
By running a manual dependency check
✅ Correct Answer: By automatically determining dependencies
20. What does Terraform use to store its state file when working with remote backends?
A remote storage service like S3 or Azure Blob Storage
A local SQLite database
A temporary in-memory cache
A dedicated Terraform server
✅ Correct Answer: A remote storage service like S3 or Azure Blob Storage
The Terraform Hashicorp Terraform Associate 003 certification is a globally recognized credential for IT professionals.
This practice test helps you prepare by covering key topics like hardware, networking, troubleshooting, and security.
Want more practice? Check out our other mock exams: