Question 590
A Terraform runbook prescribes “The provider block” to use the default provider configuration for a resource type, but it does not meet the requirement. What does that step actually accomplish?
- Providers implement resource and data-source schemas plus read, create, update and delete operations for their services.
- Terraform generally selects the default provider matching a resource's type prefix unless an alternate configuration is specified.
- A provider block can configure an endpoint, region or authentication parameters but should not carry the provider's version constraint.
- Terraform Core handles language evaluation, planning and state orchestration while provider plugins execute service-specific operations.
Explanation
Correct Answer
C:The provider block is used when an operator needs to configure API connection settings for an already required provider. Consequently, this choice cannot meet the separate requirement to use the default provider configuration for a resource type. The intended action would instead require Implicit provider selection.
Incorrect Answers
A:This behavior belongs to A provider plugin, which helps engineers translate Terraform resource operations into calls to the relevant remote API rather than satisfying the separate requirement to use the default provider configuration for a resource type. The attempted technique was The provider block; it would instead be used to configure API connection settings for an already required provider, not to produce the effect associated with A provider plugin.
B:That outcome belongs to Implicit provider selection, the mechanism that can use the default provider configuration for a resource type. The question concerns the engineer’s actual proposal, The provider block; it is directed at configure API connection settings for an already required provider, not that result.
D:This behavior belongs to Terraform Core, which helps engineers evaluate HCL expressions and calculate a resource dependency graph rather than satisfying the separate requirement to use the default provider configuration for a resource type. The attempted technique was The provider block; it would instead be used to configure API connection settings for an already required provider, not to produce the effect associated with Terraform Core.
Question 591
An operations team replacing ad-hoc scripts requires a way to use a common configuration workflow across distinct vendors. Which Terraform approach most directly fulfills that request?
- Service-agnostic resource modeling
- Provider-specific capabilities
- Isolating deployment boundaries
- Cross-provider references
Explanation
Correct Answer
A:Terraform Core offers common configuration and state mechanisms while provider schemas capture each platform's API differences; this directly meets the requirement to use a common configuration workflow across distinct vendors. By comparison, cross-provider references is intended to link an output from one service to a dependent resource on another service, which is a different task from use a common configuration workflow across distinct vendors.
Incorrect Answers
B:A shared Terraform language does not erase provider API differences; each provider defines supported resource schemas and behavior; this mechanism is useful when the job is to avoid assuming that all providers expose identical resource types and options, whereas the current scenario requires the engineer to use a common configuration workflow across distinct vendors. These operations have different effects in the stated Terraform workflow.
C:Separate root modules and state files reduce shared-plan scope when different teams or lifecycles require isolation; this mechanism is useful when the job is to limit the impact of changes to one environment or platform, whereas the current scenario requires the engineer to use a common configuration workflow across distinct vendors. These operations have different effects in the stated Terraform workflow.
D:An attribute reference between resource instances can create a dependency across provider boundaries; this mechanism is useful when the job is to link an output from one service to a dependent resource on another service, whereas the current scenario requires the engineer to use a common configuration workflow across distinct vendors. These operations have different effects in the stated Terraform workflow.
Question 592
The team evaluates “The variable type argument” for a requirement to reject caller values that cannot satisfy the declared input type. Which observed behavior belongs to that mechanism rather than a different Terraform feature?
- An output block exposes an expression value to CLI users and supported automation or cross-configuration consumers.
- A variable's type constraint enforces the intended structure and allows appropriate Terraform type conversions.
- Command-line -var assignments take high precedence and are useful for an explicit run-specific override.
- Local values are internal named expressions accessed using local.NAME; they are not module input parameters.
Explanation
Correct Answer
B:The named mechanism is used when the objective is to reject caller values that cannot satisfy the declared input type, so it produces the behavior described. In contrast, a root output block serves a different goal: publish a computed result after applying a root module, not reject caller values that cannot satisfy the declared input type.
Incorrect Answers
A:The description applies to a root output block when an engineer needs to publish a computed result after applying a root module; the named the variable type argument instead handles the requirement to reject caller values that cannot satisfy the declared input type, so this behavior does not describe The variable type argument in the situation named.
C:The description applies to the -var option when an engineer needs to supply a single variable assignment when invoking plan or apply; the named the variable type argument instead handles the requirement to reject caller values that cannot satisfy the declared input type, so this behavior does not describe The variable type argument in the situation named.
D:The description applies to a locals block when an engineer needs to compute and reuse a derived expression without asking callers to supply it; the named the variable type argument instead handles the requirement to reject caller values that cannot satisfy the declared input type, so this behavior does not describe The variable type argument in the situation named.
Question 593
A team compares Terraform mechanisms for the goal to choose where a root deployment's state will be stored. Which stated consequence belongs specifically to “Backend configuration only in a root module”?
- The local backend supports a path argument for where the state file is stored on disk.
- Terraform commonly writes backup snapshots for local state updates, but backups require the same confidentiality controls as state.
- Backend configuration is evaluated for the root module; defining backend settings inside reusable child modules does not give them separate state.
- When local workspaces are used, nondefault state snapshots are placed under a terraform.tfstate.d directory structure.
Explanation
Correct Answer
C:The named mechanism is used when the objective is to choose where a root deployment's state will be stored, so it produces the behavior described. In contrast, local workspace state directories serves a different goal: identify how the local backend stores nondefault workspaces, not choose where a root deployment's state will be stored.
Incorrect Answers
A:The description applies to a local backend path setting when an engineer needs to save the default workspace state to a nondefault local filename; the named backend configuration only in a root module instead handles the requirement to choose where a root deployment's state will be stored, so this behavior does not describe Backend configuration only in a root module in the situation named.
B:The description applies to a local state backup file when an engineer needs to recover from a state change without relying solely on an unversioned primary file; the named backend configuration only in a root module instead handles the requirement to choose where a root deployment's state will be stored, so this behavior does not describe Backend configuration only in a root module in the situation named.
D:The description applies to local workspace state directories when an engineer needs to identify how the local backend stores nondefault workspaces; the named backend configuration only in a root module instead handles the requirement to choose where a root deployment's state will be stored, so this behavior does not describe Backend configuration only in a root module in the situation named.
Question 594
An engineering checklist calls for separate outcomes: (1) connect two modules by declared output and input values; (2) select a specific VCS module release without using a registry version argument; (3) install all referenced remote child modules before planning. Which THREE options implement the requested outcomes? Choose THREE.
- terraform init for modules
- A Git HTTPS module source
- A module dependency interface
- A relative local module source
- Init after module version change
- A Git tag pin for a module
Explanation
Correct Answers
A:Initialization retrieves module sources and populates .terraform/modules while preparing other required dependencies; this meets the requirement to install all referenced remote child modules before planning, while the other selected techniques address connect two modules by declared output and input values and select a specific VCS module release without using a registry version argument, which require their own distinct Terraform mechanisms.
C:An output-to-input reference establishes a natural dependency and avoids imposing broad depends_on edges unnecessarily; this meets the requirement to connect two modules by declared output and input values, while the other selected techniques address select a specific VCS module release without using a registry version argument and install all referenced remote child modules before planning, which require their own distinct Terraform mechanisms.
F:A Git module's ?ref= tag or commit selects a repository revision instead of a registry module version constraint; this meets the requirement to select a specific VCS module release without using a registry version argument, while the other selected techniques address connect two modules by declared output and input values and install all referenced remote child modules before planning, which require their own distinct Terraform mechanisms.
Incorrect Answers
B:A git::https:// source can retrieve a Terraform module from version control rather than from the module registry; this concerns the task to fetch module code directly from a remote Git repository, not the current need to install all referenced remote child modules before planning and the independent requirement to connect two modules by declared output and input values. A terraform init for modules approach is appropriate here; the substituted A Git HTTPS module source option does not supply the specified Terraform capability and the independent requirement to connect two modules by declared output and input values.
D:A module source such as ./modules/network points to a local directory and requires no registry download or semantic version selection; it addresses reuse a neighboring module directory in the same repository, but this delivery instead requires connect two modules by declared output and input values and select a specific VCS module release without using a registry version argument and install all referenced remote child modules before planning. The required combination involves terraform init for modules and A module dependency interface and A Git tag pin for a module, not the behavior of A relative local module source.
E:Changing a module source or version constraint requires reinitializing to resolve the updated selection; it addresses install a newly allowed child module release after editing its version requirement, but this delivery instead requires connect two modules by declared output and input values and select a specific VCS module release without using a registry version argument and install all referenced remote child modules before planning. The required combination involves terraform init for modules and A module dependency interface and A Git tag pin for a module, not the behavior of Init after module version change.
Question 595
A change request asks an engineer to make state changes through supported Terraform commands and declarative refactors. Which choice best implements the requested behavior?
- Avoid direct state JSON editing
- A data source instead of import
- terraform state rm
- A refreshed missing resource
Explanation
Correct Answer
A:Manual state-file changes can break address mappings or serial consistency; commands such as state mv and moved blocks are safer; this directly meets the requirement to make state changes through supported Terraform commands and declarative refactors. By comparison, a refreshed missing resource is intended to understand why Terraform proposes creating a managed object deleted outside the workflow, which is a different task from make state changes through supported Terraform commands and declarative refactors.
Incorrect Answers
B:A data block can read an external object's attributes while avoiding taking over its create-update-delete lifecycle; this mechanism is useful when the job is to refer to shared infrastructure that another stack owns without changing its lifecycle, whereas the current scenario requires the engineer to make state changes through supported Terraform commands and declarative refactors. These operations have different effects in the stated Terraform workflow.
C:The state rm command removes the association so the remote object remains but is no longer tracked by that state; this mechanism is useful when the job is to forget a managed object without destroying the corresponding real infrastructure, whereas the current scenario requires the engineer to make state changes through supported Terraform commands and declarative refactors. These operations have different effects in the stated Terraform workflow.
D:If a provider reports a tracked object no longer exists, a normal plan generally proposes recreating it when its resource block remains; this mechanism is useful when the job is to understand why Terraform proposes creating a managed object deleted outside the workflow, whereas the current scenario requires the engineer to make state changes through supported Terraform commands and declarative refactors. These operations have different effects in the stated Terraform workflow.
Question 596
A team consuming shared Terraform modules has a concrete implementation goal: deploy two independently managed stacks from the same module definition. What is the most appropriate Terraform mechanism?
- A module call block
- A module root directory
- A module with for_each
- Module-level depends_on
- Multiple calls to one module
Explanation
Correct Answer
E:Two module blocks that use the same source create separate module instances and separate resource addresses; this directly meets the requirement to deploy two independently managed stacks from the same module definition. By comparison, module-level depends_on is intended to create an explicit ordering edge for module resources that have a real hidden dependency, which is a different task from deploy two independently managed stacks from the same module definition.
Incorrect Answers
A:The module block's source points to child configuration and its other arguments supply input variables and relevant meta-arguments; this mechanism is useful when the job is to instantiate a reusable configuration unit under a distinct local name, whereas the current scenario requires the engineer to deploy two independently managed stacks from the same module definition. These operations have different effects in the stated Terraform workflow.
B:All Terraform configuration files in a module directory are combined as one module; filenames do not define separate execution units; this mechanism is useful when the job is to understand which source files Terraform loads as one module, whereas the current scenario requires the engineer to deploy two independently managed stacks from the same module definition. These operations have different effects in the stated Terraform workflow.
C:The for_each meta-argument instantiates keyed module instances addressable as module.NAME["key"]; this mechanism is useful when the job is to create one child module instance for each stable application key, whereas the current scenario requires the engineer to deploy two independently managed stacks from the same module definition. These operations have different effects in the stated Terraform workflow.
D:depends_on on a module call affects all resources and data sources inside that module and can constrain concurrency; this mechanism is useful when the job is to create an explicit ordering edge for module resources that have a real hidden dependency, whereas the current scenario requires the engineer to deploy two independently managed stacks from the same module definition. These operations have different effects in the stated Terraform workflow.
Question 597
A runbook lists “Consistent automation pipeline” for the task to apply the same validate-plan-apply lifecycle to more than one cloud. Which technical effect should its description include?
- Terraform Core offers common configuration and state mechanisms while provider schemas capture each platform's API differences.
- A shared Terraform language does not erase provider API differences; each provider defines supported resource schemas and behavior.
- Terraform can install different providers and let each manage its own service API within a single graph.
- Terraform's core workflow works across providers even though their individual resources and authentication methods differ.
- An attribute reference between resource instances can create a dependency across provider boundaries.
Explanation
Correct Answer
D:The named mechanism is used when the objective is to apply the same validate-plan-apply lifecycle to more than one cloud, so it produces the behavior described. In contrast, cross-provider references serves a different goal: link an output from one service to a dependent resource on another service, not apply the same validate-plan-apply lifecycle to more than one cloud.
Incorrect Answers
A:The description applies to service-agnostic resource modeling when an engineer needs to use a common configuration workflow across distinct vendors; the named consistent automation pipeline instead handles the requirement to apply the same validate-plan-apply lifecycle to more than one cloud, so this behavior does not describe Consistent automation pipeline in the situation named.
B:The description applies to provider-specific capabilities when an engineer needs to avoid assuming that all providers expose identical resource types and options; the named consistent automation pipeline instead handles the requirement to apply the same validate-plan-apply lifecycle to more than one cloud, so this behavior does not describe Consistent automation pipeline in the situation named.
C:The description applies to multiple provider requirements when an engineer needs to manage cloud resources and SaaS resources in one configuration; the named consistent automation pipeline instead handles the requirement to apply the same validate-plan-apply lifecycle to more than one cloud, so this behavior does not describe Consistent automation pipeline in the situation named.
E:The description applies to cross-provider references when an engineer needs to link an output from one service to a dependent resource on another service; the named consistent automation pipeline instead handles the requirement to apply the same validate-plan-apply lifecycle to more than one cloud, so this behavior does not describe Consistent automation pipeline in the situation named.
Question 598
A runbook lists “Input variable validation” for the task to reject malformed module inputs before provisioning resources. Which technical effect should its description include?
- Static validate checks structural correctness, while condition expressions may depend on inputs or provider readings evaluated during plan or apply.
- Postconditions validate resultant resource or data-source attributes and prevent dependents from relying on invalid results.
- The validation block uses a condition and a custom error_message to enforce rules on caller-supplied values.
- Check assertions evaluate health expectations and normally report warning diagnostics rather than blocking deployment on a false condition.
Explanation
Correct Answer
C:The named mechanism is used when the objective is to reject malformed module inputs before provisioning resources, so it produces the behavior described. In contrast, the check block serves a different goal: report a failed ongoing infrastructure assertion without ordinarily blocking the apply, not reject malformed module inputs before provisioning resources.
Incorrect Answers
A:The description applies to terraform validate versus runtime assertions when an engineer needs to distinguish static configuration checks from conditions requiring actual resource values; the named input variable validation instead handles the requirement to reject malformed module inputs before provisioning resources, so this behavior does not describe Input variable validation in the situation named.
B:The description applies to postconditions for exported IDs when an engineer needs to guard a dependent consumer against a provider result that violates an invariant; the named input variable validation instead handles the requirement to reject malformed module inputs before provisioning resources, so this behavior does not describe Input variable validation in the situation named.
D:The description applies to the check block when an engineer needs to report a failed ongoing infrastructure assertion without ordinarily blocking the apply; the named input variable validation instead handles the requirement to reject malformed module inputs before provisioning resources, so this behavior does not describe Input variable validation in the situation named.
Question 599
An engineering checklist calls for separate outcomes: (1) recover from a state change without relying solely on an unversioned primary file; (2) protect stored state contents from unauthorized storage-layer access. Which TWO options implement the requested outcomes? Choose TWO.
- Backend state key separation
- The terraform.tfstate file
- Remote state encryption at rest
- A local state backup file
- No input variable interpolation in a backend block
- Local state in CI
Explanation
Correct Answers
C:Encryption is controlled by the chosen backend service; Terraform's remote backend abstraction does not supply one universal encryption mechanism; this meets the requirement to protect stored state contents from unauthorized storage-layer access, while the other selected techniques address recover from a state change without relying solely on an unversioned primary file, which require their own distinct Terraform mechanisms.
D:Terraform commonly writes backup snapshots for local state updates, but backups require the same confidentiality controls as state; this meets the requirement to recover from a state change without relying solely on an unversioned primary file, while the other selected techniques address protect stored state contents from unauthorized storage-layer access, which require their own distinct Terraform mechanisms.
Incorrect Answers
A:Using distinct backend keys or workspaces creates separate state namespaces instead of letting unrelated root configurations share one snapshot; it addresses store different applications' state snapshots at distinct object paths, but this delivery instead requires recover from a state change without relying solely on an unversioned primary file and protect stored state contents from unauthorized storage-layer access. The required combination involves A local state backup file and Remote state encryption at rest, not the behavior of Backend state key separation.
B:The default workspace's local state is kept as terraform.tfstate; this file may contain sensitive infrastructure details; it addresses identify Terraform's default local state artifact, but this delivery instead requires recover from a state change without relying solely on an unversioned primary file and protect stored state contents from unauthorized storage-layer access. The required combination involves A local state backup file and Remote state encryption at rest, not the behavior of The terraform.tfstate file.
E:Backend configuration is processed at initialization, before ordinary input expressions are evaluated, so it cannot use regular variables or locals; it addresses avoid expecting var.region or local.name to populate backend settings, but this delivery instead requires recover from a state change without relying solely on an unversioned primary file and protect stored state contents from unauthorized storage-layer access. The required combination involves A local state backup file and Remote state encryption at rest, not the behavior of No input variable interpolation in a backend block.
F:A temporary runner may lose its filesystem after a job, so durable shared state is usually needed for repeatable team automation; it addresses recognize why ephemeral build agents should not rely on a machine-local state file, but this delivery instead requires recover from a state change without relying solely on an unversioned primary file and protect stored state contents from unauthorized storage-layer access. The required combination involves A local state backup file and Remote state encryption at rest, not the behavior of Local state in CI.
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.