Free TERRAFORM-ASSOCIATE-004 Practice Test Questions and Answers (2026) Practice Questions
Free preview: 20 questions.
HashiCorp Terraform Associate 004
Q: 1
Terraform variable names are saved in the state file.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 2
Variables declared within a module are accessible outside of the module.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 3
You can configure Terraform to log to a file using the TF_LOG environment variable.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 4
If one of your modules uses a local value, you can expose that value to callers of the module by
defining a Terraform output in the module’s configuration.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 5
You have to initialize a Terraform backend before it can be configured.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 6
Terraform providers are always installed from the Internet.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 7
In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative
plan runs start automatically when you merge or commit changes to version control.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 8
Only the user that generated a plan may apply it.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 9
Outside of the required_providers block, Terraform configurations always refer to providers by their
local names.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 10
All standard backend types support state locking, and remote operations like plan, apply, and
destroy.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 11
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 12
You modified your Terraform configuration and run Terraform plan to review the changes.
Simultaneously, your teammate manually modified the infrastructure component you are working
on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the
same.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 13
Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning
with a graphical user interface (GUI)? Choose two correct answers.
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 14
What is the purpose of the terraform.lock.hcl file in Terraform?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 15
Which of the following is not a key principle of infrastructure as code?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 16
Which of the following is not a benefit of adopting infrastructure as code?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 17
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct
responses)
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 18
Which of the following is not true of Terraform providers?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 19
Where in your Terraform configuration do you specify a state backend?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 20
What is the provider for the resource shown in the Exhibit?
resource "aws_vpc" "main" {
name = "test"
}
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Question 1 of 20