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.
Question 611
A change request asks an engineer to execute exactly the plan artifact that was reviewed. Which choice best implements the requested behavior?
- Noninteractive apply settings
- Apply with a .tfvars file
- Apply a saved plan
- Apply failure recovery
Explanation
Correct Answer
C:Passing the saved plan file to terraform apply uses its recorded choices; applying a plan file does not start a new interactive replanning step; this directly meets the requirement to execute exactly the plan artifact that was reviewed. By comparison, noninteractive apply settings is intended to run Terraform in automation where prompting is not acceptable, which is a different task from execute exactly the plan artifact that was reviewed.
Incorrect Answers
A:The -input=false option prevents prompts for missing input, requiring all necessary values and approvals to be handled by automation; this mechanism is useful when the job is to run Terraform in automation where prompting is not acceptable, whereas the current scenario requires the engineer to execute exactly the plan artifact that was reviewed. These operations have different effects in the stated Terraform workflow.
B:The -var-file option loads values from an input variables file, enabling separate environment assignments; this mechanism is useful when the job is to supply a named collection of input assignments to Terraform, whereas the current scenario requires the engineer to execute exactly the plan artifact that was reviewed. These operations have different effects in the stated Terraform workflow.
D:A partial apply may have changed some resources, so Terraform should refresh and build a new plan rather than blindly assuming a full rollback; this mechanism is useful when the job is to inspect state and re-plan when a provider operation fails partway through, whereas the current scenario requires the engineer to execute exactly the plan artifact that was reviewed. These operations have different effects in the stated Terraform workflow.
Question 612
A change request asks an engineer to avoid sharing a plan artifact publicly just because console values appear redacted. Which choice best implements the requested behavior?
- Preventing credential leaks in plans
- A write-only resource argument
- No secrets in version control
- No ephemeral root output
Explanation
Correct Answer
A:Saved plan files may contain sensitive values and must be handled as confidential artifacts rather than safe public summaries; this directly meets the requirement to avoid sharing a plan artifact publicly just because console values appear redacted. By comparison, no ephemeral root output is intended to reject a design that tries to publish a runtime-only value through the root output table, which is a different task from avoid sharing a plan artifact publicly just because console values appear redacted.
Incorrect Answers
B:Provider-defined write-only arguments introduced in Terraform 1.11 are available only when the resource schema supports them; this mechanism is useful when the job is to pass a secret to a resource without persisting that argument's value, whereas the current scenario requires the engineer to avoid sharing a plan artifact publicly just because console values appear redacted. These operations have different effects in the stated Terraform workflow.
C:Secrets inserted directly into tracked configuration can leak through repository history, regardless of later state redaction; this mechanism is useful when the job is to keep API keys out of committed terraform.tfvars and .tf files, whereas the current scenario requires the engineer to avoid sharing a plan artifact publicly just because console values appear redacted. These operations have different effects in the stated Terraform workflow.
D:Terraform does not permit ephemeral = true on root-module output blocks, because their ordinary purpose is persistent presentation; this mechanism is useful when the job is to reject a design that tries to publish a runtime-only value through the root output table, whereas the current scenario requires the engineer to avoid sharing a plan artifact publicly just because console values appear redacted. These operations have different effects in the stated Terraform workflow.
Question 613
An engineer proposes “A Git SSH module source” to install all referenced remote child modules before planning. Which outcome does the proposed technique actually provide?
- Published module documentation and metadata describe the module interface and help consumers understand required arguments.
- The terraform get command updates downloaded module sources only; routine workflows generally prefer terraform init.
- A git::ssh:// module source delegates repository authentication to Git and SSH rather than a Terraform registry token.
- Initialization retrieves module sources and populates .terraform/modules while preparing other required dependencies.
Explanation
Correct Answer
C:A Git SSH module source is used when an operator needs to obtain module code from a repository that requires SSH-based access. Consequently, this choice cannot meet the separate requirement to install all referenced remote child modules before planning. The intended action would instead require terraform init for modules.
Incorrect Answers
A:This behavior belongs to Registry module documentation, which helps engineers determine a module's declared inputs, outputs, providers and usage examples rather than satisfying the separate requirement to install all referenced remote child modules before planning. The attempted technique was A Git SSH module source; it would instead be used to obtain module code from a repository that requires SSH-based access, not to produce the effect associated with Registry module documentation.
B:This behavior belongs to terraform get, which helps engineers retrieve child modules without running the complete backend and provider setup steps rather than satisfying the separate requirement to install all referenced remote child modules before planning. The attempted technique was A Git SSH module source; it would instead be used to obtain module code from a repository that requires SSH-based access, not to produce the effect associated with terraform get.
D:That outcome belongs to terraform init for modules, the mechanism that can install all referenced remote child modules before planning. The question concerns the engineer’s actual proposal, A Git SSH module source; it is directed at obtain module code from a repository that requires SSH-based access, not that result.
Question 614
The team evaluates “Provider authentication per service” for a requirement to authorize Terraform separately for two different infrastructure APIs. Which observed behavior belongs to that mechanism rather than a different Terraform feature?
- Terraform's core workflow works across providers even though their individual resources and authentication methods differ.
- Terraform can install different providers and let each manage its own service API within a single graph.
- Distinct providers can manage compute and DNS resources while references communicate values such as an assigned endpoint.
- Each provider configuration supplies or discovers credentials appropriate to the API it calls, rather than sharing a universal Terraform credential.
Explanation
Correct Answer
D:The named mechanism is used when the objective is to authorize Terraform separately for two different infrastructure APIs, so it produces the behavior described. In contrast, consistent automation pipeline serves a different goal: apply the same validate-plan-apply lifecycle to more than one cloud, not authorize Terraform separately for two different infrastructure APIs.
Incorrect Answers
A:The description applies to consistent automation pipeline when an engineer needs to apply the same validate-plan-apply lifecycle to more than one cloud; the named provider authentication per service instead handles the requirement to authorize Terraform separately for two different infrastructure APIs, so this behavior does not describe Provider authentication per service in the situation named.
B:The description applies to multiple provider requirements when an engineer needs to manage cloud resources and SaaS resources in one configuration; the named provider authentication per service instead handles the requirement to authorize Terraform separately for two different infrastructure APIs, so this behavior does not describe Provider authentication per service in the situation named.
C:The description applies to integrating platform and DNS configuration when an engineer needs to manage a cloud-hosted service and its DNS records declaratively; the named provider authentication per service instead handles the requirement to authorize Terraform separately for two different infrastructure APIs, so this behavior does not describe Provider authentication per service in the situation named.
Question 615
A Terraform change proposal names “Different values for two module calls” to instantiate the same module with distinct environment inputs. Which outcome can reviewers attribute to that particular mechanism?
- An object type lets a module enforce named configuration fields instead of accepting many untyped values.
- Each call has its own variable assignments and resource instances, even when both calls reference the same module source directory.
- Default provider configurations can be inherited, while alternate aliases need explicit mapping and declared configuration aliases.
- Each module boundary needs an output passthrough because the root cannot directly access an arbitrary grandchild's private resources.
- Variables declared by a child module belong to that module and receive values via the caller's module block.
Explanation
Correct Answer
B:The named mechanism is used when the objective is to instantiate the same module with distinct environment inputs, so it produces the behavior described. In contrast, nested module output propagation serves a different goal: make a value from a grandchild module visible to the root module, not instantiate the same module with distinct environment inputs.
Incorrect Answers
A:The description applies to input object variables when an engineer needs to pass a structured settings bundle into a reusable module; the named different values for two module calls instead handles the requirement to instantiate the same module with distinct environment inputs, so this behavior does not describe Different values for two module calls in the situation named.
C:The description applies to provider configuration inheritance when an engineer needs to understand which provider settings a child module can use from its parent; the named different values for two module calls instead handles the requirement to instantiate the same module with distinct environment inputs, so this behavior does not describe Different values for two module calls 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 different values for two module calls instead handles the requirement to instantiate the same module with distinct environment inputs, so this behavior does not describe Different values for two module calls in the situation named.
E:The description applies to child input variable scope when an engineer needs to make a setting available inside a called module without creating a global variable; the named different values for two module calls instead handles the requirement to instantiate the same module with distinct environment inputs, so this behavior does not describe Different values for two module calls in the situation named.
Question 616
A team compares Terraform mechanisms for the goal to calculate a nested network prefix from a parent CIDR range. Which stated consequence belongs specifically to “The cidrsubnet function”?
- concat joins lists end to end and preserves their element ordering, including duplicate values.
- coalescelist evaluates list arguments and returns the first with at least one element.
- cidrsubnet derives a subnet CIDR using additional prefix bits and a network number, without provisioning a network resource.
- A for expression builds derived collection values, optionally filtering with an if clause and transforming keys or values.
Explanation
Correct Answer
C:The named mechanism is used when the objective is to calculate a nested network prefix from a parent CIDR range, so it produces the behavior described. In contrast, the concat function serves a different goal: append the elements of multiple lists into one sequence, not calculate a nested network prefix from a parent CIDR range.
Incorrect Answers
A:The description applies to the concat function when an engineer needs to append the elements of multiple lists into one sequence; the named the cidrsubnet function instead handles the requirement to calculate a nested network prefix from a parent CIDR range, so this behavior does not describe The cidrsubnet function in the situation named.
B:The description applies to the coalescelist function when an engineer needs to choose the first nonempty list from several candidates; the named the cidrsubnet function instead handles the requirement to calculate a nested network prefix from a parent CIDR range, so this behavior does not describe The cidrsubnet function in the situation named.
D:The description applies to the for expression when an engineer needs to transform a collection's elements into a new list or map; the named the cidrsubnet function instead handles the requirement to calculate a nested network prefix from a parent CIDR range, so this behavior does not describe The cidrsubnet function in the situation named.
Question 617
A reusable infrastructure definition requires a way to read a map element and provide a fallback when the key is absent. Which Terraform approach most directly fulfills that request?
- The distinct function
- The lookup function
- The format function
- The flatten function
Explanation
Correct Answer
B:lookup(map, key, default) retrieves the selected key's value or the supplied default if the key does not exist; this directly meets the requirement to read a map element and provide a fallback when the key is absent. By comparison, the flatten function is intended to remove nested list layers to obtain a flat sequence, which is a different task from read a map element and provide a fallback when the key is absent.
Incorrect Answers
A:distinct returns a list with duplicates removed and retains the ordering of the first occurrence of each element; this mechanism is useful when the job is to remove repeated list values while keeping each value's first occurrence, whereas the current scenario requires the engineer to read a map element and provide a fallback when the key is absent. These operations have different effects in the stated Terraform workflow.
C:format interpolates arguments into a printf-style string template for predictable names or identifiers; this mechanism is useful when the job is to build formatted text using placeholders for typed values, whereas the current scenario requires the engineer to read a map element and provide a fallback when the key is absent. These operations have different effects in the stated Terraform workflow.
D:flatten recursively replaces nested lists with their constituent elements, while preserving ordered traversal; this mechanism is useful when the job is to remove nested list layers to obtain a flat sequence, whereas the current scenario requires the engineer to read a map element and provide a fallback when the key is absent. These operations have different effects in the stated Terraform workflow.
Question 618
A Terraform reviewer encounters “ephemeral = true on a variable” while assessing how to use a short-lived runtime secret without saving its value in plan or state. Which statement correctly describes its actual behavior?
- Vault can centralize secret lifecycle, policies and auditability, but provider and state-handling choices still determine whether a retrieved value is persisted.
- Terraform 1.10+ ephemeral variables can flow only into allowed ephemeral contexts and are omitted from persisted artifacts.
- Vault's dynamic credentials can provide expiring access with centrally enforced policies instead of permanent embedded keys.
- Saved plan files may contain sensitive values and must be handled as confidential artifacts rather than safe public summaries.
Explanation
Correct Answer
B:The named mechanism is used when the objective is to use a short-lived runtime secret without saving its value in plan or state, so it produces the behavior described. In contrast, vault-backed secret retrieval serves a different goal: retrieve an operational credential from a dedicated secret manager rather than committing it, not use a short-lived runtime secret without saving its value in plan or state.
Incorrect Answers
A:The description applies to vault-backed secret retrieval when an engineer needs to retrieve an operational credential from a dedicated secret manager rather than committing it; the named ephemeral = true on a variable instead handles the requirement to use a short-lived runtime secret without saving its value in plan or state, so this behavior does not describe ephemeral = true on a variable in the situation named.
C:The description applies to vault short-lived credentials when an engineer needs to limit the lifetime and scope of identities used by infrastructure automation; the named ephemeral = true on a variable instead handles the requirement to use a short-lived runtime secret without saving its value in plan or state, so this behavior does not describe ephemeral = true on a variable in the situation named.
D:The description applies to preventing credential leaks in plans when an engineer needs to avoid sharing a plan artifact publicly just because console values appear redacted; the named ephemeral = true on a variable instead handles the requirement to use a short-lived runtime secret without saving its value in plan or state, so this behavior does not describe ephemeral = true on a variable in the situation named.
Question 619
A reusable infrastructure definition requires a way to create a specified number of similarly configured resource instances. Which Terraform approach most directly fulfills that request?
- A bool variable type
- toset conversion
- count with a number
- A tuple type
Explanation
Correct Answer
C:The count meta-argument uses an integer expression and creates zero-based numeric instance addresses; this directly meets the requirement to create a specified number of similarly configured resource instances. By comparison, a tuple type is intended to require a fixed sequence of potentially different element types, which is a different task from create a specified number of similarly configured resource instances.
Incorrect Answers
A:The bool primitive type represents logical truth values used in conditionals and comparisons; this mechanism is useful when the job is to limit a feature toggle to true or false values, whereas the current scenario requires the engineer to create a specified number of similarly configured resource instances. These operations have different effects in the stated Terraform workflow.
B:toset converts a collection into a set; duplicate elements are removed and original positional ordering is not preserved; this mechanism is useful when the job is to deduplicate a collection of string identifiers for keyed iteration, whereas the current scenario requires the engineer to create a specified number of similarly configured resource instances. These operations have different effects in the stated Terraform workflow.
D:tuple([string, number]) enforces a position-specific sequence with different type constraints; this mechanism is useful when the job is to require a fixed sequence of potentially different element types, whereas the current scenario requires the engineer to create a specified number of similarly configured resource instances. These operations have different effects in the stated Terraform workflow.
Question 620
An engineer intends to make a subnet wait for the network resource it references and is reviewing “An implicit dependency through an ID”. What consequence follows from using it as intended?
- The lifecycle rule prevents destruction or replacement while it remains declared on the resource; removing its block removes that protection.
- The -target option narrows an operation to selected objects and prerequisites; routine selective deployment is not its intended model.
- A terraform_data resource can expose input-related lifecycle actions for replace_triggered_by, which expects managed resource changes.
- Using the network object's ID in the subnet argument automatically creates a dependency edge in the graph.
Explanation
Correct Answer
D:The named mechanism is used when the objective is to make a subnet wait for the network resource it references, so it produces the behavior described. In contrast, terraform_data as a replacement trigger serves a different goal: trigger replacement from a plain variable value change, not make a subnet wait for the network resource it references.
Incorrect Answers
A:The description applies to prevent_destroy when an engineer needs to reject an execution plan that deletes a protected configured object; the named an implicit dependency through an ID instead handles the requirement to make a subnet wait for the network resource it references, so this behavior does not describe An implicit dependency through an ID in the situation named.
B:The description applies to resource targeting as an exception when an engineer needs to repair an isolated broken dependency while acknowledging incomplete plan coverage; the named an implicit dependency through an ID instead handles the requirement to make a subnet wait for the network resource it references, so this behavior does not describe An implicit dependency through an ID in the situation named.
C:The description applies to terraform_data as a replacement trigger when an engineer needs to trigger replacement from a plain variable value change; the named an implicit dependency through an ID instead handles the requirement to make a subnet wait for the network resource it references, so this behavior does not describe An implicit dependency through an ID in the situation named.