Skip to content

Terraform Modules Questions

Practice questions for Terraform Modules topic in HashiCorp Certified: Terraform Associate (004). 20 questions covering this domain.

20 questions5 easy12 medium3 hard
Q1
medium

Why do teams commonly use Terraform modules?

Q2
medium

A team uses a public registry module in production and wants stable, predictable behavior across runs. What should they add to the module block?

Q3
medium

A root module needs to call a local child module stored in a sibling folder named modules/network. What source value should the module block use?

Q4
medium

How does a parent module access a value exported by a child module named network?

Q5
medium

In Terraform terminology, what is the root module?

Q6
easy

What is the purpose of the providers argument in a module block?

Q7
medium

What kind of value must a module block use for its source argument?

Q8
easy

A developer changes a module block's source or version. What must they do next so Terraform updates the local module code?

Q9
hard

A team needs a module stored under modules/vpc inside a Git repository. Which source syntax selects that subdirectory?

Q10
medium

When can you use the version argument in a module block?

Q11
hard

A workspace in HCP Terraform must download a private Git-based module during remote runs. Which authentication method is supported?

Q12
medium

A module lives in the modules/vpc subdirectory of a Git repository and you also need ref=v1.2.0. Where should the query parameter appear?

Q13
medium

A root module calls the same registry module twice with different inputs. What must remain unique in the configuration?

Q14
easy

Why are absolute filesystem paths discouraged in a module source argument?

Q15
medium

A Git module source includes depth=1. What restriction applies to the ref parameter?

Q16
hard

A module call uses source = git::https://example.com/network.git//modules/vpc. Why can code inside that subdirectory still refer to another module in ...

Q17
medium

A module block for a public registry source includes version = '>= 1.2.0'. How does Terraform use that setting?

Q18
easy

When calling a child module, who determines which non-built-in input arguments are valid inside that module block?

Q19
easy

What source address prefix identifies a module from an HCP Terraform private registry?

Q20
medium

A root module needs several instances of the same child module, each driven by different keys in a map. Which meta-argument is the better fit?

Sign in to see all 20 questions

Create a free account to browse all questions — completely free during our launch phase.