Question 600
A team proposes “terraform providers” to change a tracked object's resource address after an intentional refactor. If they proceed with that technique, which result should they anticipate instead?
- State rm deletes the state association, not the object in the external system.
- State mv updates address mapping within state and does not move the real infrastructure object between regions or accounts.
- The providers command displays provider requirements and their module relationships for dependency troubleshooting.
- State show presents one resource's stored attributes in human-readable form and may reveal secret values.
Explanation
Correct Answer
C:terraform providers is used when an operator needs to inspect which providers the current configuration requires. Consequently, this choice cannot meet the separate requirement to change a tracked object's resource address after an intentional refactor. The intended action would instead require terraform state mv.
Incorrect Answers
A:This behavior belongs to terraform state rm, which helps engineers stop tracking a resource without telling its provider to delete the remote object rather than satisfying the separate requirement to change a tracked object's resource address after an intentional refactor. The attempted technique was terraform providers; it would instead be used to inspect which providers the current configuration requires, not to produce the effect associated with terraform state rm.
B:That outcome belongs to terraform state mv, the mechanism that can change a tracked object's resource address after an intentional refactor. The question concerns the engineer’s actual proposal, terraform providers; it is directed at inspect which providers the current configuration requires, not that result.
D:This behavior belongs to terraform state show ADDRESS, which helps engineers view attributes for a specified state-tracked resource instance rather than satisfying the separate requirement to change a tracked object's resource address after an intentional refactor. The attempted technique was terraform providers; it would instead be used to inspect which providers the current configuration requires, not to produce the effect associated with terraform state show ADDRESS.
Question 601
An engineering checklist calls for separate outcomes: (1) create an explicit ordering edge for module resources that have a real hidden dependency; (2) install a newly allowed child module release after editing its version requirement. Which TWO options implement the requested outcomes? Choose TWO.
- Init after module version change
- Module-level depends_on
- Module composition
- Avoiding hard-coded child credentials
- Provider and module version separation
- A pessimistic module version constraint
Explanation
Correct Answers
A:Changing a module source or version constraint requires reinitializing to resolve the updated selection; this meets the requirement to install a newly allowed child module release after editing its version requirement, while the other selected techniques address create an explicit ordering edge for module resources that have a real hidden dependency, which require their own distinct Terraform mechanisms.
B:depends_on on a module call affects all resources and data sources inside that module and can constrain concurrency; this meets the requirement to create an explicit ordering edge for module resources that have a real hidden dependency, while the other selected techniques address install a newly allowed child module release after editing its version requirement, which require their own distinct Terraform mechanisms.
Incorrect Answers
C:Parent configurations can pass one child module's outputs into another child's inputs to compose larger infrastructure systems; it addresses combine small modules into a root configuration without producing one giant module, but this delivery instead requires create an explicit ordering edge for module resources that have a real hidden dependency and install a newly allowed child module release after editing its version requirement. The required combination involves Module-level depends_on and Init after module version change, not the behavior of Module composition.
D:Reusable modules normally declare provider requirements while callers supply provider configurations and credentials; it addresses keep authentication and deployment-specific region choices outside a reusable child module, but this delivery instead requires create an explicit ordering edge for module resources that have a real hidden dependency and install a newly allowed child module release after editing its version requirement. The required combination involves Module-level depends_on and Init after module version change, not the behavior of Avoiding hard-coded child credentials.
E:Provider versions are constrained in required_providers and locked in .terraform.lock.hcl; registry modules use their module block version arguments; it addresses avoid confusing provider plugin selection with reusable module source selection, but this delivery instead requires create an explicit ordering edge for module resources that have a real hidden dependency and install a newly allowed child module release after editing its version requirement. The required combination involves Module-level depends_on and Init after module version change, not the behavior of Provider and module version separation.
F:A module version ~> 2.1.0 permits 2.1.x releases but excludes 2.2.0 and later; it addresses allow compatible patch updates within a module's minor release series, but this delivery instead requires create an explicit ordering edge for module resources that have a real hidden dependency and install a newly allowed child module release after editing its version requirement. The required combination involves Module-level depends_on and Init after module version change, not the behavior of A pessimistic module version constraint.
Question 602
An engineering checklist calls for separate outcomes: (1) audit the results of infrastructure changes across a team; (2) retain the association between a configuration address and its actual managed object. Which TWO options implement the requested outcomes? Choose TWO.
- Reusable execution records
- Collaboration through remote state
- HCL configuration files
- Consistent dependency management
- State-backed object tracking
- Provider-mediated API operations
Explanation
Correct Answers
A:Version control and run history provide traceable context for what configuration changed and what Terraform planned or applied; this meets the requirement to audit the results of infrastructure changes across a team, while the other selected techniques address retain the association between a configuration address and its actual managed object, which require their own distinct Terraform mechanisms.
E:Terraform state records mappings and attributes needed to compare future plans without rediscovering every object's identity from scratch; this meets the requirement to retain the association between a configuration address and its actual managed object, while the other selected techniques address audit the results of infrastructure changes across a team, which require their own distinct Terraform mechanisms.
Incorrect Answers
B:A backend supporting remote storage and locking can centralize state and prevent conflicting concurrent changes; it addresses allow authorized operators to use one shared source of Terraform state, but this delivery instead requires audit the results of infrastructure changes across a team and retain the association between a configuration address and its actual managed object. The required combination involves State-backed object tracking and Reusable execution records, not the behavior of Collaboration through remote state.
C:Terraform reads .tf files written in HCL, including blocks, arguments, expressions and references that describe the intended objects; it addresses represent managed infrastructure using Terraform's native declarative language, but this delivery instead requires audit the results of infrastructure changes across a team and retain the association between a configuration address and its actual managed object. The required combination involves State-backed object tracking and Reusable execution records, not the behavior of HCL configuration files.
D:Terraform infers many dependencies from references and applies graph ordering to create or modify related resources safely; it addresses avoid hand-sequencing every resource operation, but this delivery instead requires audit the results of infrastructure changes across a team and retain the association between a configuration address and its actual managed object. The required combination involves State-backed object tracking and Reusable execution records, not the behavior of Consistent dependency management.
F:Terraform Core evaluates configuration while provider plugins implement the provider-specific API operations; it addresses manage infrastructure services through a shared declarative workflow, but this delivery instead requires audit the results of infrastructure changes across a team and retain the association between a configuration address and its actual managed object. The required combination involves State-backed object tracking and Reusable execution records, not the behavior of Provider-mediated API operations.
Question 603
Reviewers reject “Module provider mappings” as a way to deploy two independently managed stacks from the same module definition. Which actual behavior explains why the proposal is unsuitable?
- An output-to-input reference establishes a natural dependency and avoids imposing broad depends_on edges unnecessarily.
- Two module blocks that use the same source create separate module instances and separate resource addresses.
- depends_on on a module call affects all resources and data sources inside that module and can constrain concurrency.
- The providers map on the module call maps child provider names to selected provider configurations from the root module.
Explanation
Correct Answer
D:Module provider mappings is used when an operator needs to send the correct region-specific provider into a reusable child module. Consequently, this choice cannot meet the separate requirement to deploy two independently managed stacks from the same module definition. The intended action would instead require Multiple calls to one module.
Incorrect Answers
A:This behavior belongs to A module dependency interface, which helps engineers connect two modules by declared output and input values rather than satisfying the separate requirement to deploy two independently managed stacks from the same module definition. The attempted technique was Module provider mappings; it would instead be used to send the correct region-specific provider into a reusable child module, not to produce the effect associated with A module dependency interface.
B:That outcome belongs to Multiple calls to one module, the mechanism that can deploy two independently managed stacks from the same module definition. The question concerns the engineer’s actual proposal, Module provider mappings; it is directed at send the correct region-specific provider into a reusable child module, not that result.
C:This behavior belongs to Module-level depends_on, which helps engineers create an explicit ordering edge for module resources that have a real hidden dependency rather than satisfying the separate requirement to deploy two independently managed stacks from the same module definition. The attempted technique was Module provider mappings; it would instead be used to send the correct region-specific provider into a reusable child module, not to produce the effect associated with Module-level depends_on.
Question 604
An engineer intends to pin a VCS module to a specific Git branch, tag or commit and is reviewing “A Git ref query parameter”. What consequence follows from using it as intended?
- HCP Terraform's private registry can distribute approved modules with access control and supported version metadata.
- Keeping reusable child modules separately versioned allows independent adoption and maintenance by different Terraform root modules.
- A source address ending in ?ref=... selects a Git revision; it does not use the registry-specific module version argument.
- A module source such as ./modules/network points to a local directory and requires no registry download or semantic version selection.
Explanation
Correct Answer
C:The named mechanism is used when the objective is to pin a VCS module to a specific Git branch, tag or commit, so it produces the behavior described. In contrast, a separate module repository serves a different goal: share reusable Terraform configuration with multiple root projects, not pin a VCS module to a specific Git branch, tag or commit.
Incorrect Answers
A:The description applies to a private registry module source when an engineer needs to reuse an internally published module available to authorized organization members; the named a Git ref query parameter instead handles the requirement to pin a VCS module to a specific Git branch, tag or commit, so this behavior does not describe A Git ref query parameter in the situation named.
B:The description applies to a separate module repository when an engineer needs to share reusable Terraform configuration with multiple root projects; the named a Git ref query parameter instead handles the requirement to pin a VCS module to a specific Git branch, tag or commit, so this behavior does not describe A Git ref query parameter in the situation named.
D:The description applies to a relative local module source when an engineer needs to reuse a neighboring module directory in the same repository; the named a Git ref query parameter instead handles the requirement to pin a VCS module to a specific Git branch, tag or commit, so this behavior does not describe A Git ref query parameter in the situation named.
Question 605
A change request asks an engineer to ensure a force-unlock targets the correct held state lock. Which choice best implements the requested behavior?
- terraform plan -lock-timeout
- State consistency during CI
- A lock identifier
- terraform force-unlock
Explanation
Correct Answer
C:Terraform uses lock information to distinguish a specific operation's lock from unrelated lock holders; this directly meets the requirement to ensure a force-unlock targets the correct held state lock. By comparison, terraform plan -lock-timeout is intended to wait for a temporary state lock instead of failing immediately, which is a different task from ensure a force-unlock targets the correct held state lock.
Incorrect Answers
A:The lock-timeout option lets Terraform retry lock acquisition for a specified duration before returning an error; this mechanism is useful when the job is to wait for a temporary state lock instead of failing immediately, whereas the current scenario requires the engineer to ensure a force-unlock targets the correct held state lock. These operations have different effects in the stated Terraform workflow.
B:A state backend with locking helps serialize competing changes, complemented by pipeline approval and run coordination; this mechanism is useful when the job is to keep two pipelines from changing the same infrastructure state simultaneously, whereas the current scenario requires the engineer to ensure a force-unlock targets the correct held state lock. These operations have different effects in the stated Terraform workflow.
D:The force-unlock command removes a lock by its identifier; using it during an active operation can cause state corruption; this mechanism is useful when the job is to release a stale lock when the original process is definitively gone, whereas the current scenario requires the engineer to ensure a force-unlock targets the correct held state lock. These operations have different effects in the stated Terraform workflow.
Question 606
An engineer intends to remove the managed infrastructure described by the current Terraform configuration and is reviewing “terraform destroy”. What consequence follows from using it as intended?
- The destroy command plans and applies removal of managed objects subject to lifecycle and provider constraints.
- Removing a state association, for example with terraform state rm, makes Terraform forget the object without asking the provider to delete it.
- Providers and remote APIs can reject deletion when dependencies, protection flags or permissions prevent removing the object.
- Terraform generally reverses dependency order when destroying managed resources so dependent objects are removed first.
Explanation
Correct Answer
A:The named mechanism is used when the objective is to remove the managed infrastructure described by the current Terraform configuration, so it produces the behavior described. In contrast, remove from state without deletion serves a different goal: stop managing an existing object while preserving the real remote infrastructure, not remove the managed infrastructure described by the current Terraform configuration.
Incorrect Answers
B:The description applies to remove from state without deletion when an engineer needs to stop managing an existing object while preserving the real remote infrastructure; the named terraform destroy instead handles the requirement to remove the managed infrastructure described by the current Terraform configuration, so this behavior does not describe terraform destroy in the situation named.
C:The description applies to resource-specific delete restrictions when an engineer needs to diagnose why destroy fails despite valid Terraform syntax; the named terraform destroy instead handles the requirement to remove the managed infrastructure described by the current Terraform configuration, so this behavior does not describe terraform destroy in the situation named.
D:The description applies to dependency-aware deletion when an engineer needs to remove dependent resources before objects they rely on; the named terraform destroy instead handles the requirement to remove the managed infrastructure described by the current Terraform configuration, so this behavior does not describe terraform destroy in the situation named.
Question 607
A team compares Terraform mechanisms for the goal to limit ordinary display of a sensitive result exported from a reusable module. Which stated consequence belongs specifically to “Child module outputs and sensitivity”?
- Each call has its own variable assignments and resource instances, even when both calls reference the same module source directory.
- An object type lets a module enforce named configuration fields instead of accepting many untyped values.
- A child output can be marked sensitive, but its underlying value may still reside in state unless it uses permitted ephemeral handling.
- Each module boundary needs an output passthrough because the root cannot directly access an arbitrary grandchild's private resources.
Explanation
Correct Answer
C:The named mechanism is used when the objective is to limit ordinary display of a sensitive result exported from a reusable module, so it produces the behavior described. In contrast, input object variables serves a different goal: pass a structured settings bundle into a reusable module, not limit ordinary display of a sensitive result exported from a reusable module.
Incorrect Answers
A:The description applies to different values for two module calls when an engineer needs to instantiate the same module with distinct environment inputs; the named child module outputs and sensitivity instead handles the requirement to limit ordinary display of a sensitive result exported from a reusable module, so this behavior does not describe Child module outputs and sensitivity in the situation named.
B:The description applies to input object variables when an engineer needs to pass a structured settings bundle into a reusable module; the named child module outputs and sensitivity instead handles the requirement to limit ordinary display of a sensitive result exported from a reusable module, so this behavior does not describe Child module outputs and sensitivity in the situation named.
D:The description applies to nested module output propagation when an engineer needs to make a value from a grandchild module visible to the root module; the named child module outputs and sensitivity instead handles the requirement to limit ordinary display of a sensitive result exported from a reusable module, so this behavior does not describe Child module outputs and sensitivity in the situation named.
Question 608
A module author evaluates the expression one(["only"]) with the literal inputs shown. What is the resulting Terraform value?
- null
- 1
- "only" (single string value)
- ["only"] (one-element list value)
Explanation
Correct Answer
C:The expression one(["only"]) evaluates to "only" because one extracts the sole member from a collection containing exactly one item. This is Terraform's direct evaluation of the supplied literal arguments in one(["only"]), not an external provider lookup.
Incorrect Answers
A:Null is returned for an empty collection, not for a singleton. In this specific evaluation, one extracts the sole member from a collection containing exactly one item, which rules out the proposed alternative.
B:This is a count of members instead of the member's string value. HCL evaluates one(["only"]) using the supplied arguments: one extracts the sole member from a collection containing exactly one item; the listed result is therefore incorrect.
D:One returns the member itself, not its surrounding collection. For one(["only"]), one extracts the sole member from a collection containing exactly one item; consequently this candidate is not the value Terraform computes.
Question 609
A Terraform runbook prescribes “Provider aliases” to configure API connection settings for an already required provider, but it does not meet the requirement. What does that step actually accomplish?
- The namespace portion of a source address separates provider publishers in the registry.
- A provider configuration with alias defines a named alternate that resources or modules can explicitly select.
- Many provider plugins can read credentials from provider-specific environment variables or identity mechanisms, reducing secret exposure in configuration.
- A provider block can configure an endpoint, region or authentication parameters but should not carry the provider's version constraint.
Explanation
Correct Answer
B:Provider aliases is used when an operator needs to configure two connections to the same service for different regions or accounts. Consequently, this choice cannot meet the separate requirement to configure API connection settings for an already required provider. The intended action would instead require The provider block.
Incorrect Answers
A:This behavior belongs to The provider registry namespace, which helps engineers identify the publisher when providers share a type name rather than satisfying the separate requirement to configure API connection settings for an already required provider. The attempted technique was Provider aliases; it would instead be used to configure two connections to the same service for different regions or accounts, not to produce the effect associated with The provider registry namespace.
C:This behavior belongs to Provider authentication environment variables, which helps engineers avoid hard-coding a provider's API credential into .tf files rather than satisfying the separate requirement to configure API connection settings for an already required provider. The attempted technique was Provider aliases; it would instead be used to configure two connections to the same service for different regions or accounts, not to produce the effect associated with Provider authentication environment variables.
D:That outcome belongs to The provider block, the mechanism that can configure API connection settings for an already required provider. The question concerns the engineer’s actual proposal, Provider aliases; it is directed at configure two connections to the same service for different regions or accounts, not that result.
Question 610
An infrastructure drift investigation needs to use multiple logical state namespaces when the backend implementation supports it. Which feature or operation is the most direct match?
- Remote state encryption at rest
- Backend credentials from the environment
- Backend state key separation
- No input variable interpolation in a backend block
- Remote backend support for workspaces
Explanation
Correct Answer
E:Workspace support depends on the selected backend, and each workspace tracks its own state snapshot; this directly meets the requirement to use multiple logical state namespaces when the backend implementation supports it. By comparison, no input variable interpolation in a backend block is intended to avoid expecting var.region or local.name to populate backend settings, which is a different task from use multiple logical state namespaces when the backend implementation supports it.
Incorrect Answers
A:Encryption is controlled by the chosen backend service; Terraform's remote backend abstraction does not supply one universal encryption mechanism; this mechanism is useful when the job is to protect stored state contents from unauthorized storage-layer access, whereas the current scenario requires the engineer to use multiple logical state namespaces when the backend implementation supports it. These operations have different effects in the stated Terraform workflow.
B:Supported backends can discover authentication from environment settings or identity mechanisms rather than inline key literals; this mechanism is useful when the job is to avoid embedding cloud backend access keys into tracked Terraform source, whereas the current scenario requires the engineer to use multiple logical state namespaces when the backend implementation supports it. These operations have different effects in the stated Terraform workflow.
C:Using distinct backend keys or workspaces creates separate state namespaces instead of letting unrelated root configurations share one snapshot; this mechanism is useful when the job is to store different applications' state snapshots at distinct object paths, whereas the current scenario requires the engineer to use multiple logical state namespaces when the backend implementation supports it. These operations have different effects in the stated Terraform workflow.
D:Backend configuration is processed at initialization, before ordinary input expressions are evaluated, so it cannot use regular variables or locals; this mechanism is useful when the job is to avoid expecting var.region or local.name to populate backend settings, whereas the current scenario requires the engineer to use multiple logical state namespaces when the backend implementation supports it. These operations have different effects in the stated Terraform workflow.