Question 490
A build pipeline compares module versioning across source types. A reviewer must determine how to refresh external module and provider selections to newly permitted releases. Which action is the appropriate choice?
- Use
>= 1.2.0, < 2.0.0 for registry modules
- Specify a registry module version in the call
- Use a release tag as a Git source ref
- Run
terraform init -upgrade after changing a version range
- Review the plan after a module upgrade
Explanation
Correct Answer
D:Upgrade mode re-fetches and reevaluates eligible dependencies; existing infrastructure does not change until a subsequent plan/apply; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases. This directly supports the task to refresh external module and provider selections to newly permitted releases during a cross-team handoff.
Incorrect Answers
A:Multiple constraints are intersected when selecting registry module versions; they express an acceptable range, not a request to always use the latest major release; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases. The stated requirement is to refresh external module and provider selections to newly permitted releases, not to permit a defined compatible interval of releases; this alternative addresses a different control or phase.
B:The source says which module to fetch, while version constrains published versions; both are important for predictable registry consumption; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases. That can be useful when the aim is to distinguish registry version selection from source identification, but it does not directly deliver the requested ability to refresh external module and provider selections to newly permitted releases.
C:A Git tag can name a release, but mutable tags remain a repository-governance risk; this version control is separate from registry module version constraints; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases. The distinction matters here: using that mechanism to refer to a known Git module milestone would still leave the objective to refresh external module and provider selections to newly permitted releases unmet.
E:A new module may replace resources or alter defaults; initialization only fetches code; the plan reveals its likely infrastructure impact; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases. The stated requirement is to refresh external module and provider selections to newly permitted releases, not to spot effects caused by changed child resource definitions; this alternative addresses a different control or phase.
Question 491
A team is retrieving reusable Terraform modules. The team must both consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference. Which paired choice implements those distinct goals?
- Use a private registry module source + Use
?ref=v1.4.0 with a Git source
- Use a private registry module source + Use a public registry source
namespace/name/provider
- Use the module registry's documented inputs and outputs + Use
?ref=v1.4.0 with a Git source
- Run
terraform init after adding an external module + Understand source address is required for a module call
Explanation
Correct Answer
A:For the first criterion, private module registries support reusable approved patterns with access controls; consumers still specify the correct source and supported version selection; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference; this directly addresses the need to consume an organization-controlled module with published releases. For the separate second criterion, a Git ref selects code from the repository; for reproducibility a commit or immutable release tag is safer than a moving branch; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference; this fulfills the need to pin a Git-sourced module to a named tag, commit, or branch reference. Together they cover the independent tasks of consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference without exchanging the responsibilities of these features.
Incorrect Answers
B:The first measure meets the requirement to consume an organization-controlled module with published releases, but its partner serves a different role: The shorthand identifies a Terraform Registry module and its provider category; version constraints can apply to registry-sourced modules; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference. That second component is designed to retrieve a published module from its registry address, so the still-missing criterion is to pin a Git-sourced module to a named tag, commit, or branch reference, while the first criterion remains consume an organization-controlled module with published releases.
C:The second measure does meet the pin a Git-sourced module to a named tag, commit, or branch reference requirement, but the first is designed for another concern: Published modules define an intended interface; callers supply declared variables and consume declared outputs; internal resources are implementation details; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference. That first component is designed to integrate the module without assuming internal resource names are its API, which does not accomplish the requested task to consume an organization-controlled module with published releases, even though the other measure satisfies pin a Git-sourced module to a named tag, commit, or branch reference.
D:The first measure is intended to download newly declared module source code: Initialization retrieves remote modules and prepares the local working directory. terraform fmt cannot fetch source packages; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference. The second measure is intended to identify where Terraform should load the child configuration: The source argument resolves module code; a module block with no valid source cannot simply invent the child's resources; this behavior should be assessed against the concrete need to consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference. Neither is the directly designated method for the separate goals of consume an organization-controlled module with published releases and pin a Git-sourced module to a named tag, commit, or branch reference in this review.
Question 492
A caller cannot access an internal child value. Two independent changes are requested: first, allow a caller to reference child results; second, allow callers to omit that specific module argument. Which pair of measures fulfills both?
- Expose selected values via
output blocks + Use object inputs to bundle related options
- Use typed module inputs + Use a default on a child input for optional behavior
- Pass a root output through a child input explicitly + Treat module output sensitivity as contagious
- Use
nullable = false for a non-null module input + Use a default on a child input for optional behavior
- Expose selected values via
output blocks + Use a default on a child input for optional behavior
Explanation
Correct Answer
E:For the first criterion, a child output becomes accessible as module.instance.output_name; callers cannot directly reach arbitrary unexported resources inside the child module; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument; this directly addresses the need to allow a caller to reference child results. For the separate second criterion, a variable default supplies the value within the child when no argument is passed; other child inputs without defaults remain required; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument; this fulfills the need to allow callers to omit that specific module argument. Together they cover the independent tasks of allow a caller to reference child results and allow callers to omit that specific module argument without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to allow a caller to reference child results, but its partner serves a different role: A typed object can describe several coherent settings at one interface boundary; nested data is still validated against the child's declared input contract; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument. That second component is designed to reduce sprawling module argument lists while preserving type checking, so the still-missing criterion is to allow callers to omit that specific module argument, while the first criterion remains allow a caller to reference child results.
B:The second measure does meet the allow callers to omit that specific module argument requirement, but the first is designed for another concern: Type constraints describe accepted strings, collections, or nested objects; they make the child-module contract more predictable than undocumented any values; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument. That first component is designed to catch incompatible caller values before deployment, which does not accomplish the requested task to allow a caller to reference child results, even though the other measure satisfies allow callers to omit that specific module argument.
C:The first measure is intended to connect two modules while preserving their separate scopes: A caller can use module.upstream.value as an argument to module.downstream; this also creates a dependency through the reference; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument. The second measure is intended to avoid accidentally publishing a secret through the caller's outputs: Sensitive values can flow across module boundaries; a root output exposing a sensitive value generally needs an explicit sensitive marking; state protection remains necessary; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument. Neither is the directly designated method for the separate goals of allow a caller to reference child results and allow callers to omit that specific module argument in this review.
D:The second measure does meet the allow callers to omit that specific module argument requirement, but the first is designed for another concern: The variable setting controls whether null is permitted; it does not imply that the child can choose a cloud credential automatically; this behavior should be assessed against the concrete need to allow a caller to reference child results and allow callers to omit that specific module argument. That first component is designed to reject a caller's explicit null rather than accidentally passing it onward, which does not accomplish the requested task to allow a caller to reference child results, even though the other measure satisfies allow callers to omit that specific module argument.
Question 493
An engineer wants to instantiate multiple copies of a component. A reviewer must determine how to avoid configuring cloud credentials separately in every reusable child. Which action is the appropriate choice?
- Use
count on a compatible module call
- Define a
module block with source
- Build a root orchestration module
- Share provider configurations from the root
- Keep backend configuration in the root module
Explanation
Correct Answer
D:A child module should declare provider requirements while receiving provider configurations through inheritance or explicit mapping; this supports flexible reuse; this behavior should be assessed against the concrete need to avoid configuring cloud credentials separately in every reusable child. This directly supports the task to avoid configuring cloud credentials separately in every reusable child during a cross-team handoff.
Incorrect Answers
A:Count produces addresses such as module.worker[0]; each instance can receive a different input computed from count.index; this behavior should be assessed against the concrete need to avoid configuring cloud credentials separately in every reusable child. The distinction matters here: using that mechanism to create a numbered collection of module instances would still leave the objective to avoid configuring cloud credentials separately in every reusable child unmet.
B:A module call loads the child configuration and supplies its arguments; the caller's root remains responsible for backend setup; this behavior should be assessed against the concrete need to avoid configuring cloud credentials separately in every reusable child. It may support a related workflow, but the question specifically requires the mechanism for avoid configuring cloud credentials separately in every reusable child rather than instantiate a reusable child configuration from a known location.
C:The root module can connect network, compute, and monitoring children through inputs and outputs; each child's encapsulation reduces repeated configuration; this behavior should be assessed against the concrete need to avoid configuring cloud credentials separately in every reusable child. The stated requirement is to avoid configuring cloud credentials separately in every reusable child, not to compose specialized children without embedding infrastructure logic everywhere; this alternative addresses a different control or phase.
E:The backend applies to the top-level working configuration; child modules cannot independently select state storage during a normal shared module call; this behavior should be assessed against the concrete need to avoid configuring cloud credentials separately in every reusable child. The distinction matters here: using that mechanism to avoid assuming a backend in a child controls the caller's state would still leave the objective to avoid configuring cloud credentials separately in every reusable child unmet.
Question 494
During a module implementation, the team must accomplish all of these distinct aims: (1) refresh external module and provider selections to newly permitted releases; (2) spot effects caused by changed child resource definitions. Select exactly the two relevant mechanisms. Choose TWO.
- Use
?ref=COMMIT on a Git module
- Review the plan after a module upgrade
- Run
terraform init -upgrade after changing a version range
- Set
version = "= 1.4.2" on a registry module
- Set
version = "~> 2.3" on a registry module
Explanation
Correct Answers
B:A new module may replace resources or alter defaults; initialization only fetches code; the plan reveals its likely infrastructure impact; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases and spot effects caused by changed child resource definitions. This matches the distinct objective to spot effects caused by changed child resource definitions; the remaining chosen features address refresh external module and provider selections to newly permitted releases.
C:Upgrade mode re-fetches and reevaluates eligible dependencies; existing infrastructure does not change until a subsequent plan/apply; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases and spot effects caused by changed child resource definitions. This matches the distinct objective to refresh external module and provider selections to newly permitted releases; the remaining chosen features address spot effects caused by changed child resource definitions.
Incorrect Answers
A:A commit hash identifies precise source content; module version arguments are not interpreted for raw Git sources; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases and spot effects caused by changed child resource definitions. Its main application is to choose a specific revision from an external Git repository; the checklist instead asks for refresh external module and provider selections to newly permitted releases; and spot effects caused by changed child resource definitions. None of those distinct criteria specifically calls for this alternative.
D:An equality constraint selects a specific registry release; it avoids accidental upgrades until the configuration is changed; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases and spot effects caused by changed child resource definitions. Its main application is to use one exact published module version for reproducible runs; the checklist instead asks for refresh external module and provider selections to newly permitted releases; and spot effects caused by changed child resource definitions. None of those distinct criteria specifically calls for this alternative.
E:The pessimistic version constraint selects an eligible published release; it cannot pin raw Git URLs because that source uses its own reference mechanism; this behavior should be assessed against the concrete need to refresh external module and provider selections to newly permitted releases and spot effects caused by changed child resource definitions. Its main application is to allow compatible registry releases within a bounded series; the checklist instead asks for refresh external module and provider selections to newly permitted releases; and spot effects caused by changed child resource definitions. None of those distinct criteria specifically calls for this alternative.
Question 495
A developer is deciding how to reference shared module code. Two independent changes are requested: first, reuse a module from a sibling directory; second, consume an organization-controlled module with published releases. Which pair of measures fulfills both?
- Use
source = "../shared" + Avoid confusing a module with a provider
- Understand source address is required for a module call + Use a local module source for rapid in-repository changes
- Use
source = "../shared" + Use a private registry module source
- Use
?ref=v1.4.0 with a Git source + Use a private registry module source
Explanation
Correct Answer
C:For the first criterion, parent-relative local paths allow neighboring configurations to share code; the directory must be present on the machine or in the checked-out repository; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases; this directly addresses the need to reuse a module from a sibling directory. For the separate second criterion, private module registries support reusable approved patterns with access controls; consumers still specify the correct source and supported version selection; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases; this fulfills the need to consume an organization-controlled module with published releases. Together they cover the independent tasks of reuse a module from a sibling directory and consume an organization-controlled module with published releases without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure meets the requirement to reuse a module from a sibling directory, but its partner serves a different role: A module contains HCL blocks; a provider implements external API operations; an external module may use providers but is not itself a provider binary; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases. That second component is designed to recognize reusable Terraform configuration versus an API integration plugin, so the still-missing criterion is to consume an organization-controlled module with published releases, while the first criterion remains reuse a module from a sibling directory.
B:The first measure is intended to identify where Terraform should load the child configuration: The source argument resolves module code; a module block with no valid source cannot simply invent the child's resources; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases. The second measure is intended to develop a shared component without publishing a remote module release: A local module is loaded from the current filesystem tree; changes are visible with the current checkout instead of awaiting a registry release; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases. Neither is the directly designated method for the separate goals of reuse a module from a sibling directory and consume an organization-controlled module with published releases in this review.
D:The second measure does meet the consume an organization-controlled module with published releases requirement, but the first is designed for another concern: A Git ref selects code from the repository; for reproducibility a commit or immutable release tag is safer than a moving branch; this behavior should be assessed against the concrete need to reuse a module from a sibling directory and consume an organization-controlled module with published releases. That first component is designed to pin a Git-sourced module to a named tag, commit, or branch reference, which does not accomplish the requested task to reuse a module from a sibling directory, even though the other measure satisfies consume an organization-controlled module with published releases.
Question 496
During a module implementation, one task is to allow callers to omit that specific module argument, while another is to compute implementation details without exposing extra inputs. Select the matching pair of techniques.
- Pass a root output through a child input explicitly + Use child locals for internal derivations
- Use a default on a child input for optional behavior + Use typed module inputs
- Use a default on a child input for optional behavior + Use child locals for internal derivations
- Pass a child input in the
module block + Expose selected values via output blocks
Explanation
Correct Answer
C:For the first criterion, a variable default supplies the value within the child when no argument is passed; other child inputs without defaults remain required; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs; this directly addresses the need to allow callers to omit that specific module argument. For the separate second criterion, local values are not parameters the caller can set directly; they provide readable internal names for expressions derived from variables and resources; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs; this fulfills the need to compute implementation details without exposing extra inputs. Together they cover the independent tasks of allow callers to omit that specific module argument and compute implementation details without exposing extra inputs without exchanging the responsibilities of these features.
Incorrect Answers
A:The second measure does meet the compute implementation details without exposing extra inputs requirement, but the first is designed for another concern: A caller can use module.upstream.value as an argument to module.downstream; this also creates a dependency through the reference; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs. That first component is designed to connect two modules while preserving their separate scopes, which does not accomplish the requested task to allow callers to omit that specific module argument, even though the other measure satisfies compute implementation details without exposing extra inputs.
B:The first measure meets the requirement to allow callers to omit that specific module argument, but its partner serves a different role: Type constraints describe accepted strings, collections, or nested objects; they make the child-module contract more predictable than undocumented any values; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs. That second component is designed to catch incompatible caller values before deployment, so the still-missing criterion is to compute implementation details without exposing extra inputs, while the first criterion remains allow callers to omit that specific module argument.
D:The first measure is intended to assign the caller's value to the child's required variable: Arguments in a module call map into variables declared by that child; an undeclared argument is not a magic global variable; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs. The second measure is intended to allow a caller to reference child results: A child output becomes accessible as module.instance.output_name; callers cannot directly reach arbitrary unexported resources inside the child module; this behavior should be assessed against the concrete need to allow callers to omit that specific module argument and compute implementation details without exposing extra inputs. Neither is the directly designated method for the separate goals of allow callers to omit that specific module argument and compute implementation details without exposing extra inputs in this review.
Question 497
The immediate Terraform task is to compose specialized children without embedding infrastructure logic everywhere. Which method handles that task most directly?
- Use
depends_on on a module when necessary
- Use
count on a compatible module call
- Pass the
providers mapping to a child
- Build a root orchestration module
- Use
for_each on a compatible module call
Explanation
Correct Answer
D:The root module can connect network, compute, and monitoring children through inputs and outputs; each child's encapsulation reduces repeated configuration; this behavior should be assessed against the concrete need to compose specialized children without embedding infrastructure logic everywhere. This directly supports the task to compose specialized children without embedding infrastructure logic everywhere during a platform review.
Incorrect Answers
A:An explicit module dependency orders its operations after the listed object; prefer output references when they can express the dependency more narrowly; this behavior should be assessed against the concrete need to compose specialized children without embedding infrastructure logic everywhere. It may support a related workflow, but the question specifically requires the mechanism for compose specialized children without embedding infrastructure logic everywhere rather than enforce a hidden prerequisite for an entire child module.
B:Count produces addresses such as module.worker[0]; each instance can receive a different input computed from count.index; this behavior should be assessed against the concrete need to compose specialized children without embedding infrastructure logic everywhere. The stated requirement is to compose specialized children without embedding infrastructure logic everywhere, not to create a numbered collection of module instances; this alternative addresses a different control or phase.
C:A module provider map binds the child's expected names to configured parent provider instances; it does not install providers independently; this behavior should be assessed against the concrete need to compose specialized children without embedding infrastructure logic everywhere. That can be useful when the aim is to select which root provider configurations the module uses, but it does not directly deliver the requested ability to compose specialized children without embedding infrastructure logic everywhere.
E:For-each instance addresses include keys and are often easier to maintain through membership changes than positional count indices; this behavior should be assessed against the concrete need to compose specialized children without embedding infrastructure logic everywhere. It may support a related workflow, but the question specifically requires the mechanism for compose specialized children without embedding infrastructure logic everywhere rather than instantiate a module per stable map or set key.
Question 498
A Terraform rollout has separate acceptance criteria: use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. Which combined approach directly satisfies the two criteria?
- Use a release tag as a Git source ref + Run
terraform init -upgrade after changing a version range
- Set
version = "= 1.4.2" on a registry module + Use ?ref=COMMIT on a Git module
- Set
version = "~> 2.3" on a registry module + Use ?ref=COMMIT on a Git module
- Set
version = "= 1.4.2" on a registry module + Review the plan after a module upgrade
- Document compatibility requirements for module consumers + Use
?ref=COMMIT on a Git module
Explanation
Correct Answer
B:For the first criterion, an equality constraint selects a specific registry release; it avoids accidental upgrades until the configuration is changed; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository; this directly addresses the need to use one exact published module version for reproducible runs. For the separate second criterion, a commit hash identifies precise source content; module version arguments are not interpreted for raw Git sources; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository; this fulfills the need to choose a specific revision from an external Git repository. Together they cover the independent tasks of use one exact published module version for reproducible runs and choose a specific revision from an external Git repository without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to refer to a known Git module milestone: A Git tag can name a release, but mutable tags remain a repository-governance risk; this version control is separate from registry module version constraints; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. The second measure is intended to refresh external module and provider selections to newly permitted releases: Upgrade mode re-fetches and reevaluates eligible dependencies; existing infrastructure does not change until a subsequent plan/apply; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. Neither is the directly designated method for the separate goals of use one exact published module version for reproducible runs and choose a specific revision from an external Git repository in this review.
C:The second measure does meet the choose a specific revision from an external Git repository requirement, but the first is designed for another concern: The pessimistic version constraint selects an eligible published release; it cannot pin raw Git URLs because that source uses its own reference mechanism; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. That first component is designed to allow compatible registry releases within a bounded series, which does not accomplish the requested task to use one exact published module version for reproducible runs, even though the other measure satisfies choose a specific revision from an external Git repository.
D:The first measure meets the requirement to use one exact published module version for reproducible runs, but its partner serves a different role: A new module may replace resources or alter defaults; initialization only fetches code; the plan reveals its likely infrastructure impact; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. That second component is designed to spot effects caused by changed child resource definitions, so the still-missing criterion is to choose a specific revision from an external Git repository, while the first criterion remains use one exact published module version for reproducible runs.
E:The second measure does meet the choose a specific revision from an external Git repository requirement, but the first is designed for another concern: A reusable module can state minimum provider versions and tested Terraform versions; this keeps consumers from resolving unsupported combinations; this behavior should be assessed against the concrete need to use one exact published module version for reproducible runs and choose a specific revision from an external Git repository. That first component is designed to make dependency expectations explicit before broad reuse, which does not accomplish the requested task to use one exact published module version for reproducible runs, even though the other measure satisfies choose a specific revision from an external Git repository.
Question 499
During a module implementation, one task is to integrate the module without assuming internal resource names are its API, while another is to recognize reusable Terraform configuration versus an API integration plugin. Select the matching pair of techniques.
- Use
git::https://... as the source + Understand source address is required for a module call
- Use the module registry's documented inputs and outputs + Avoid confusing a module with a provider
- Use
//subdirectory in an external module source + Avoid confusing a module with a provider
- Use the module registry's documented inputs and outputs + Use
source = "./modules/network"
Explanation
Correct Answer
B:For the first criterion, published modules define an intended interface; callers supply declared variables and consume declared outputs; internal resources are implementation details; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin; this directly addresses the need to integrate the module without assuming internal resource names are its API. For the separate second criterion, a module contains HCL blocks; a provider implements external API operations; an external module may use providers but is not itself a provider binary; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin; this fulfills the need to recognize reusable Terraform configuration versus an API integration plugin. Together they cover the independent tasks of integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin without exchanging the responsibilities of these features.
Incorrect Answers
A:The first measure is intended to fetch module code directly from a Git repository: Terraform supports a Git URL source and can use a reference query parameter; the registry version argument is not used to version raw Git sources; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin. The second measure is intended to identify where Terraform should load the child configuration: The source argument resolves module code; a module block with no valid source cannot simply invent the child's resources; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin. Neither is the directly designated method for the separate goals of integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin in this review.
C:The second measure does meet the recognize reusable Terraform configuration versus an API integration plugin requirement, but the first is designed for another concern: The double-slash delimiter distinguishes the subdirectory from the package URL; terraform retrieves the containing package before entering the path; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin. That first component is designed to select a nested module directory inside a downloaded repository, which does not accomplish the requested task to integrate the module without assuming internal resource names are its API, even though the other measure satisfies recognize reusable Terraform configuration versus an API integration plugin.
D:The first measure meets the requirement to integrate the module without assuming internal resource names are its API, but its partner serves a different role: Local sources refer to code on disk, and ./ makes the relative location explicit; they do not select a published registry version; this behavior should be assessed against the concrete need to integrate the module without assuming internal resource names are its API and recognize reusable Terraform configuration versus an API integration plugin. That second component is designed to load a child module from a path relative to the calling configuration, so the still-missing criterion is to recognize reusable Terraform configuration versus an API integration plugin, while the first criterion remains integrate the module without assuming internal resource names are its API.
Question 500
A reviewer has to approve a two-part design: catch incompatible caller values before deployment; additionally, connect two modules while preserving their separate scopes. Which option pairs the correct mechanisms?
- Use typed module inputs + Pass a root output through a child input explicitly
- Keep same-named child inputs separate across module calls + Avoid referencing child
local values from the parent
- Use typed module inputs + Expose selected values via
output blocks
- Use object inputs to bundle related options + Pass a root output through a child input explicitly
Explanation
Correct Answer
A:For the first criterion, type constraints describe accepted strings, collections, or nested objects; they make the child-module contract more predictable than undocumented any values; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes; this directly addresses the need to catch incompatible caller values before deployment. For the separate second criterion, a caller can use module.upstream.value as an argument to module.downstream; this also creates a dependency through the reference; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes; this fulfills the need to connect two modules while preserving their separate scopes. Together they cover the independent tasks of catch incompatible caller values before deployment and connect two modules while preserving their separate scopes without exchanging the responsibilities of these features.
Incorrect Answers
B:The first measure is intended to assign different values to identically named inputs in two distinct module instances: Each call has its own variable namespace and argument values; passing region = "east" in one module call does not alter var.region inside another instance; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes. The second measure is intended to preserve encapsulation of implementation-only calculations: Only outputs are exposed for general child-module consumption; callers should not depend on private local names that may change during refactoring; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes. Neither is the directly designated method for the separate goals of catch incompatible caller values before deployment and connect two modules while preserving their separate scopes in this review.
C:The first measure meets the requirement to catch incompatible caller values before deployment, but its partner serves a different role: A child output becomes accessible as module.instance.output_name; callers cannot directly reach arbitrary unexported resources inside the child module; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes. That second component is designed to allow a caller to reference child results, so the still-missing criterion is to connect two modules while preserving their separate scopes, while the first criterion remains catch incompatible caller values before deployment.
D:The second measure does meet the connect two modules while preserving their separate scopes requirement, but the first is designed for another concern: A typed object can describe several coherent settings at one interface boundary; nested data is still validated against the child's declared input contract; this behavior should be assessed against the concrete need to catch incompatible caller values before deployment and connect two modules while preserving their separate scopes. That first component is designed to reduce sprawling module argument lists while preserving type checking, which does not accomplish the requested task to catch incompatible caller values before deployment, even though the other measure satisfies connect two modules while preserving their separate scopes.