- A
Module sources can be local paths or remote URLs.
Terraform supports various source types including local, registry, Git, HTTP, etc.
- B
Version constraints can be specified for any module source.
Why wrong: Version constraints are supported only for registry and some remote sources; local paths do not support them.
- C
The outputs of a module are available after apply only.
Why wrong: Outputs may be known during planning if they depend on known values; they are not limited to after apply.
- D
A module block can contain multiple resources and child modules.
Modules encapsulate any number of resources and can call other modules.
- E
Module inputs can be optional if the module uses a default.
If a variable has a default value, it becomes optional for the caller.
Quick Answer
The correct statements are that module sources can be local paths or remote URLs, a module block can contain multiple resources and child modules, and module inputs can be optional if the module defines a default value. This is because Terraform modules are designed as reusable containers that encapsulate infrastructure logic, and input variables with default values allow callers to omit those arguments without causing errors. On the HashiCorp Terraform Associate TF-003 exam, this topic tests your understanding of module configuration best practices and input variables, often appearing in multiple-select questions where common traps include assuming all outputs are unknown during planning or that every source type supports version constraints. A key memory tip is to remember "defaults make inputs optional" and that local paths cannot be versioned, so always check source type before applying version constraints.
TF-003 Interact with Terraform modules Practice Question
This TF-003 practice question tests your understanding of interact with terraform modules. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Which THREE statements about module configuration are correct?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Module sources can be local paths or remote URLs.
Options A, B, and E are correct. Module sources can be local paths or remote URLs (A). A module block can contain multiple resources and even child modules (B). Module inputs can be optional if the module defines a default value (E). Option C is false because outputs from a module can be known during planning (using terraform plan) if the values are deterministic. Option D is false because not all source types support version constraints (e.g., local paths).
Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Module sources can be local paths or remote URLs.
- ✗
Version constraints can be specified for any module source.
Why it's wrong here
Version constraints are supported only for registry and some remote sources; local paths do not support them.
- ✗
The outputs of a module are available after apply only.
Why it's wrong here
Outputs may be known during planning if they depend on known values; they are not limited to after apply.
- ✓
A module block can contain multiple resources and child modules.
Why this is correct
Modules encapsulate any number of resources and can call other modules.
Related concept
Static NAT maps one inside address to one outside address.
- ✓
Module inputs can be optional if the module uses a default.
Why this is correct
If a variable has a default value, it becomes optional for the caller.
Related concept
Static NAT maps one inside address to one outside address.
Common exam traps
Common exam trap: NAT rules depend on direction and matching traffic
NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.
Trap categories for this question
Command / output trap
Outputs may be known during planning if they depend on known values; they are not limited to after apply.
Detailed technical explanation
How to think about this question
NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.
KKey Concepts to Remember
- Static NAT maps one inside address to one outside address.
- PAT allows many inside hosts to share one public address using ports.
- Inside local and inside global describe the private and translated addresses.
- NAT ACLs identify traffic for translation, not always security filtering.
TExam Day Tips
- Identify inside and outside interfaces first.
- Check whether the scenario needs static NAT, dynamic NAT or PAT.
- Do not confuse NAT matching ACLs with normal packet-filtering intent.
Key takeaway
NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related TF-003 NAT questions on configuration and troubleshooting.
- →
Interact with Terraform modules — study guide chapter
Learn the concepts, then practise the questions
- →
Interact with Terraform modules practice questions
Targeted practice on this topic area only
- →
All TF-003 questions
519 questions across all exam domains
- →
HashiCorp Terraform Associate TF-003 study guide
Full concept coverage aligned to exam objectives
- →
TF-003 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related TF-003 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Understand IaC concepts practice questions
Practise TF-003 questions linked to Understand IaC concepts.
Understand Terraform basics practice questions
Practise TF-003 questions linked to Understand Terraform basics.
Understand Terraform's purpose practice questions
Practise TF-003 questions linked to Understand Terraform's purpose.
Use Terraform outside the core workflow practice questions
Practise TF-003 questions linked to Use Terraform outside the core workflow.
Interact with Terraform modules practice questions
Practise TF-003 questions linked to Interact with Terraform modules.
Use the core Terraform workflow practice questions
Practise TF-003 questions linked to Use the core Terraform workflow.
Implement and maintain state practice questions
Practise TF-003 questions linked to Implement and maintain state.
Read, generate and modify configuration practice questions
Practise TF-003 questions linked to Read, generate and modify configuration.
TF-003 fundamentals practice questions
Practise TF-003 questions linked to TF-003 fundamentals.
TF-003 scenario practice questions
Practise TF-003 questions linked to TF-003 scenario.
TF-003 troubleshooting practice questions
Practise TF-003 questions linked to TF-003 troubleshooting.
Practice this exam
Start a free TF-003 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this TF-003 question test?
Interact with Terraform modules — This question tests Interact with Terraform modules — Static NAT maps one inside address to one outside address..
What is the correct answer to this question?
The correct answer is: Module sources can be local paths or remote URLs. — Options A, B, and E are correct. Module sources can be local paths or remote URLs (A). A module block can contain multiple resources and even child modules (B). Module inputs can be optional if the module defines a default value (E). Option C is false because outputs from a module can be known during planning (using terraform plan) if the values are deterministic. Option D is false because not all source types support version constraints (e.g., local paths).
What should I do if I get this TF-003 question wrong?
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related TF-003 NAT questions on configuration and troubleshooting.
What is the key concept behind this question?
Static NAT maps one inside address to one outside address.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
5 more ways this is tested on TF-003
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which TWO statements about Terraform module structure and best practices are correct? (Choose two.)
hard- ✓ A.A module should define variables for any values that need to be customized by the calling configuration.
- B.A module should assume the calling configuration will provide all necessary provider configurations.
- C.A module must have all Terraform code in a single main.tf file.
- ✓ D.A module can be sourced from the same repository as the root module using a relative path.
- E.A module should rely on direct attribute references to resources in the calling configuration.
Why A: Option A is correct because Terraform modules are designed to be reusable and configurable. By defining input variables for any customizable values (e.g., resource names, sizes, regions), the module abstracts away hardcoded details and allows the calling configuration to pass in specific values via variable assignments. This follows the principle of encapsulation, where the module's internal logic remains unchanged while its behavior adapts to the caller's needs.
Variation 2. Which TWO statements about Terraform modules are correct?
easy- A.The count meta-argument is not supported on module blocks.
- B.Module outputs are automatically available as inputs to other modules in the same configuration.
- C.Module sources must include a version constraint to ensure reproducibility.
- ✓ D.A module can be called multiple times in the same configuration with different input variables.
- ✓ E.The source attribute of a module can be a Git repository URL with a specific commit SHA.
Why D: Option A is correct because a module can be called multiple times with different inputs. Option E is correct because Git URLs with a commit SHA are valid module sources. Option B is incorrect because version constraints are optional. Option C is incorrect because count and for_each are supported on module blocks. Option D is incorrect because module outputs must be explicitly referenced.
Variation 3. You are developing a module. Which TWO actions are recommended best practices?
medium- A.Use the same provider configuration as the root module.
- ✓ B.Use local values to simplify expressions.
- C.Hardcode default values for all variables.
- ✓ D.Define outputs for all resources created.
- E.Use absolute paths in module source.
Why B: Options B and C are correct. Defining outputs for important resources (B) allows consumers to access module results. Using local values (C) simplifies expressions and improves readability. Option A (hardcoding defaults) reduces flexibility. Option D (absolute paths) makes modules less portable. Option E is unnecessary because provider configurations are inherited.
Variation 4. After running `terraform plan`, the user receives an error: `Error: Missing required variable`. The variable 'vpc_cidr' is provided. What is the most likely cause?
medium- ✓ A.The module requires a variable 'environment' that is not passed.
- B.The module block syntax is incorrect.
- C.The variable 'vpc_cidr' is misspelled.
- D.The variable 'vpc_cidr' conflicts with a provider variable.
Why A: The module defines a second required variable 'environment' that has no default value and is not set in the module block, causing the error. Option B is wrong because 'vpc_cidr' is provided. Option C is wrong because syntax is correct. Option D is wrong because there is no conflict; the variable is simply unset.
Variation 5. A module requires a specific provider configuration with aliases. The root module has two provider configurations: provider 'aws' (default) and provider 'aws' with alias = 'uswest'. The module uses the us-west alias. How should the module block be configured to ensure the correct provider is used?
hard- A.Set required_providers inside the module to include the alias.
- ✓ B.Use the providers argument in the module block: providers = { aws = aws.uswest }.
- C.Include a provider block inside the module block with alias = 'uswest'.
- D.Do nothing; Terraform automatically uses the default provider.
Why B: Option D is correct because providers argument within module block allows mapping aliases to provider configurations. Option A is wrong because required_providers is for provider requirements, not provider selection. Option B is wrong because provider block is not allowed inside module block. Option C is wrong because the module will use the default provider if not specified.
Keep practising
More TF-003 practice questions
- Which TWO statements accurately describe the purpose of Terraform? (Choose two.)
- A team is evaluating Terraform for managing their multi-cloud infrastructure. Which TWO statements accurately describe T…
- Which TWO of the following are valid use cases for using Terraform Cloud's Sentinel policies? (Choose two.)
- Match each Terraform function to its category.
- Match each Terraform provisioner to its typical use case.
- Match each Terraform meta-argument to its purpose.
Last reviewed: Jun 24, 2026
This TF-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-003 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.