Terraform
Sample Questions - Terraform Associate (003)
HashiCorp Associate Certification exams consist of multiple choice, multiple answer, true/false, and text match 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
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
Multiple answer questions ask you to select multiple correct answers from a list. The question indicates you how many answers you must choose.
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 you 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? Choose TWO correct answers.
ā¬ 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? Choose TWO correct answers.
ā¬ 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.
Text Match
Text match questions present you with a statement and ask you to fill in the blank by typing an answer into a text box. The exam will accept common typos and variations on the correct answer. Text match is not case sensitive.
Example
Which flag is used to find more information about a Terraform command? For example, you need additional information about how to use the plan
command. You would type: terraform plan _____
. Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
ā
-h
ā
-help
ā
--help
Answers that would also receive full credit:
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.