Terraform
Sample Questions - Terraform Associate 004
Note
The material covered on this page is for the Terraform Associate 004 exam version, coming January 8, 2026. Switch to the Terraform Associate 003 exam version if you need to take the exam before that date.
HashiCorp Associate-level certification exams consist of true or false, multiple choice, and multiple answer question types. Below are some example questions to introduce you to the question format you will encounter on the exam.
The exam questions are not intended to trick you. The exam tests your knowledge of Terraform, not how well you spell or how good you are at identifying obscure details.
Visit the HashiCorp Cloud Engineer Certification page for more information and to sign up for the exam.
True or false questions
True or false questions present you with a statement and ask you to choose whether it is true or false.
Example
Usernames and passwords referenced in the Terraform code, even as variables, will end up in plain text in the state file.
š True
š False
ā
Correct: True
ā Incorrect: False
Multiple choice questions
Multiple choice questions ask you to select one correct answer from a list.
Examples
Consider the following configuration snippet:
variable "vpc_cidrs" {
type = map
default = {
us-east-1 = "10.0.0.0/16"
us-east-2 = "10.1.0.0/16"
us-west-1 = "10.2.0.0/16"
us-west-2 = "10.3.0.0/16"
}
}
resource "aws_vpc" "shared" {
cidr_block = _____________
}
How would you define the cidr_block
for us-east-1 in the aws_vpc
resource using a variable?
š var.vpc_cidrs["us-east-1"]
š var.vpc_cidrs.0
š vpc_cidrs["us-east-1"]
š var.vpc_cidrs[0]
ā
Correct: var.vpc_cidrs["us-east-1"]
ā Incorrect: var.vpc_cidrs.0
ā Incorrect: vpc_cidrs["us-east-1"]
ā Incorrect: var.vpc_cidrs[0]
You have defined the values for your variables in the file terraform.tfvars
, and saved it in the same directory as your Terraform configuration. Which of the following commands will use those values when creating an execution plan?
š terraform plan
š terraform plan -var-file=terraform.tfvars
š All of the above
š None of the above
ā Incorrect: terraform plan
ā Incorrect: terraform plan -var-file=terraform.tfvars
ā
Correct: All of the above
ā Incorrect: None of the above
Multiple answer
Multiple answer questions ask you to select multiple correct answers from a list. The question indicates how many answers you must choose.
Examples
Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments? Pick the 2 correct responses below
⬠terraform plan
⬠terraform state
⬠terraform apply
⬠terraform validate
⬠terraform output
ā
Correct: terraform plan
ā Incorrect: terraform state
ā
Correct: terraform apply
ā Incorrect: terraform validate
ā Incorrect: terraform output
What happens when you apply Terraform configuration? Pick the 2 correct responses below
⬠Terraform makes any infrastructure changes defined in your configuration.
⬠Terraform gets the plugins that the configuration requires.
⬠Terraform updates the state file with any configuration changes it made.
⬠Terraform corrects formatting errors in your configuration.
⬠Terraform destroys and recreates all your infrastructure from scratch.
ā
Correct: Terraform makes any infrastructure changes defined in your configuration.
ā Incorrect: Terraform gets the plugins that the configuration requires.
ā
Correct: Terraform updates the state file with any configuration changes it made.
ā Incorrect: Terraform corrects formatting errors in your configuration.
ā Incorrect: Terraform destroys and recreates all your infrastructure from scratch.
Continue studying
To study all of the objectives tested on the exam, review the materials in our learning path. For a reference of the specific study materials that cover a particular exam objective, refer to the content list.