Terraform Associate Practice Questions
Prepare for Terraform Associate with more than an answer.
- Level
- Associate
- Valid for
- 2 years
Domains covered on the exam 9
- Understand Infrastructure as Code (IaC) Concepts10%
- Understand the Purpose of Terraform10%
- Understand Terraform Basics15%
- Use Terraform Outside of Core Workflow10%
- Interact with Terraform Modules10%
- Use the Core Terraform Workflow15%
- Implement and Maintain State15%
- Read, Generate, and Modify Configuration15%
- Understand HCP Terraform Capabilities10%
- 1
Which of the following is not a valid string function in Terraform?
Show answer details
Correct answer: D
- 2
Where in your Terraform configuration do you specify a state backend?
Show answer details
Correct answer: A
Explanation:
Backends are configured with a nested backend block within the top-level terraform block. -- Reference: https://www.terraform.io/docs/language/settings/backends/configuration.html - 3
A provider configuration block is required in every Terraform configuration.
Example:

Show answer details
Correct answer: A
- 4
What information does the public Terraform Module Registry automatically expose about published modules?
Show answer details
Correct answer: E
- 5
What is a key benefit of using a remote backend, such as Amazon S3 with DynamoDB, over the default local backend?
graph TD subgraph Local_Backend A[Developer A's Laptop] B[terraform.tfstate] A --> B end subgraph Remote_Backend C[Developer A's Laptop] D[Developer B's Laptop] E[CI/CD Runner] F[S3 Bucket for State] G[DynamoDB for Locking] C --> F D --> F E --> F C --> G D --> G E --> G endShow answer details
Correct answer: B
The local backend stores the state file on the user's machine, which is unsuitable for team environments. A remote backend stores the state in a shared location (like S3), allowing all team members and automation to access the same state. It also typically supports locking (like with DynamoDB) to prevent dangerous concurrent operations.
- 6
Terraform requires the Go runtime as a prerequisite for installation.
Show answer details
Correct answer: B
- 7
Terraform variables and outputs that set the "description" argument will store that description in the state file.
Show answer details
Correct answer: B
- 8
What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?
Show answer details
Correct answer: D
Explanation:
Terraform Registry is an index of modules shared publicly using this protocol. This public registry is the easiest way to get started with Terraform and find modules created by others in the community. -- Reference: https://www.terraform.io/docs/language/modules/sources.html - 9
Which provisioner invokes a process on the resource created by Terraform?
Show answer details
Correct answer: A
Explanation:
The remote-exec provisioner invokes a script on a remote resource after it is created.
-- Reference: https://www.terraform.io/docs/language/resources/provisioners/remote-exec.html - 10
You need to specify a dependency manually.
What resource meta-parameter can you use to make sure Terraform respects the dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.
Show answer details
Correct answer: A
