Pass HashiCorp Terraform Associate 004 Exam in First Attempt Guaranteed!
Get 100% Latest Exam Questions, Accurate & Verified Answers!
30 Days Free Updates, Instant Download!
HashiCorp Terraform Associate 004 Practice Test 39
Question 380
During an authorized design and operations review at a water utility engineering division, engineers supporting field diagnostics and public service discover that an operator changes an instance size outside Terraform and an unchanged HCL plan unexpectedly proposes an update. Confirming evidence shows that provider refresh reports live instance size differs from the tracked configuration. The recommendation must address the demonstrated ML failure without an unrelated pipeline redesign. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. The approved plan reconciles drift without unreviewed destruction. Terraform compares desired configuration with refreshed remote objects and recorded state to detect drift.
Incorrect Answers
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. Authorized workspace reads the original managed identities from the remote backend and local copies are controlled. The intervention addresses the fault, but the proposed test checks a different outcome. The approved plan reconciles drift without unreviewed destruction.
Review drift evidence and decide whether to restore declared state or adopt an approved new configuration. A second writer waits or fails safely while a first authorized apply holds the lock. That uses the intended change yet measures the wrong result. The approved plan reconciles drift without unreviewed destruction.
Assign independent state keys or workspaces with strict access boundaries and verify their actual remote state identity. Each environment plan shows only its own managed objects and account resources. Review drift evidence and decide whether to restore declared state or adopt an approved new configuration; The approved plan reconciles drift without unreviewed destruction.
Question 381
At a telecom platform operator, a change advisory board is reviewing ML input and inference paths for subscriber portals and network inventory. The reported issue is that a root configuration accepts an unrestricted provider version and a new initialization downloads a release with incompatible resource argument behavior. The team proposes to declare an appropriate required_providers source and bounded version constraint and approve dependency-lock changes. Service owners require a reproducible result without unsafe or unapproved production testing. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections. Lockfile diff and init output identify a new major provider release absent in the last tested run. Declare an appropriate required_providers source and bounded version constraint and approve dependency-lock changes.
Incorrect Answers
Plan can query resources with the intended identity while privileged operations remain limited by policy. Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections.
A subsequent plan recognizes the existing object under the new address without replacing it. Lockfile diff and init output identify a new major provider release absent in the last tested run. Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections.
The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources. Lockfile diff and init output identify a new major provider release absent in the last tested run. Clean initialization resolves a tested provider release and repeat runs use consistent dependency selections.
Question 382
A controlled cloud model operations assessment for an aviation operations provider concerns airfield and ticketing services. Reviewers find that an engineer sees a state lock error and prepares to force-unlock while another deployment is still applying. The relevant evidence is that runner audit shows an active workflow and lock ID belonging to the current legitimate writer. The plan is to inspect lock ownership and active runs and only unlock a stale lock after confirming the writer is inactive. Which Terraform design principle best explains the chosen response?
Explanation
Correct Answer
Force-unlock is a recovery operation that can endanger state when used against a live writer. Runner audit shows an active workflow and lock ID belonging to the current legitimate writer. Inspect lock ownership and active runs and only unlock a stale lock after confirming the writer is inactive.
Incorrect Answers
Terraform compares desired configuration with refreshed remote objects and recorded state to detect drift. Runner audit shows an active workflow and lock ID belonging to the current legitimate writer. Force-unlock is a recovery operation that can endanger state when used against a live writer.
Remote backend isolation depends on explicit workspace or state-key identity not merely folder names. Force-unlock is a recovery operation that can endanger state when used against a live writer.
A backend configuration change and migration of existing state are distinct steps. Runner audit shows an active workflow and lock ID belonging to the current legitimate writer. Force-unlock is a recovery operation that can endanger state when used against a live writer.
Question 383
During an authorized design and operations review at an insurance technology provider, engineers supporting claims workflow and secure identity systems discover that terraform parses a compute resource declaration but fails at planning because the corresponding provider cannot authenticate to its service. The proposed remedy is to configure the provider's supported authentication through scoped workload identity and check the effective execution principal. Only a controlled and reversible ML workflow change fits the approved release window. Which finding would best distinguish the suspected cause from nearby Terraform configuration issues?
Explanation
Correct Answer
The error names the provider client credential chain rather than an invalid Terraform resource type. Providers translate Terraform requests into authenticated remote service API operations. Configure the provider's supported authentication through scoped workload identity and check the effective execution principal.
Incorrect Answers
The working directory has no downloaded plugin and init has not been executed for the current configuration. The error names the provider client credential chain rather than an invalid Terraform resource type. Configure the provider's supported authentication through scoped workload identity and check the effective execution principal.
Terraform init reports that the inferred registry source does not contain the named provider. The error names the provider client credential chain rather than an invalid Terraform resource type. Configure the provider's supported authentication through scoped workload identity and check the effective execution principal.
Both state snapshots contain different serials and each claims authority over the same infrastructure objects. Configure the provider's supported authentication through scoped workload identity and check the effective execution principal.
Question 384
At a global university IT team, a change advisory board is reviewing ML input and inference paths for research and campus application environments. The reported issue is that a test cleanup script calls terraform destroy from a terminal whose active backend points at production. Observation: terraform workspace show and backend inspection reveal the production state is selected. The team must preserve approved data handling and avoid widening access to sensitive features. Which intervention most directly addresses the underlying Terraform 1.12 infrastructure workflow failure?
Explanation
Correct Answer
Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup. Terraform workspace show and backend inspection reveal the production state is selected. The disposable test state is destroyed while production resources remain unchanged.
Incorrect Answers
Run terraform init within the correct root module before planning, using reviewed backend and plugin settings. Terraform workspace show and backend inspection reveal the production state is selected. Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup.
Use Terraform reconciliation normally and deliberately request replacement only with an explicit justified workflow. Terraform workspace show and backend inspection reveal the production state is selected. Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup.
Inspect the partial state and failures, resolve the quota condition, then rerun plan and apply for remaining differences. Terraform workspace show and backend inspection reveal the production state is selected. Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup.
Question 385
At a retail banking integration team, a change advisory board is reviewing ML input and inference paths for branch and account technology. The reported issue is that a test cleanup script calls terraform destroy from a terminal whose active backend points at production. Confirming evidence shows that terraform workspace show and backend inspection reveal the production state is selected. The team must preserve approved data handling and avoid widening access to sensitive features. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup. The disposable test state is destroyed while production resources remain unchanged. Terraform workspace show and backend inspection reveal the production state is selected. Terraform destroy acts on the selected state and must be bounded by environment identity and review.
Incorrect Answers
Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup. The configuration is both consistently formatted and structurally valid before planning. The remedy may be appropriate, but that check does not establish the required recovery. The disposable test state is destroyed while production resources remain unchanged.
Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup. The next successful apply converges on desired configuration without recreating already tracked objects. The intervention addresses the fault, but the proposed test checks a different outcome. The disposable test state is destroyed while production resources remain unchanged.
Implement the standard write-initialize-plan-review-apply lifecycle with required approval before mutation. Every deployment has an inspected change proposal and the approved apply uses the reviewed scope. This pair concerns a different control or outcome, leaving the recorded fault unresolved. Confirm backend and workspace identity and require explicit approved targeting before destructive cleanup; The disposable test state is destroyed while production resources remain unchanged.
Question 386
For warehouse and supply chain services at a food distribution operator, the infrastructure platform team is investigating the following incident: a module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. The relevant evidence is that initialization reports unsupported version argument for a nonregistry module source. The plan is to pin Git source through a supported ref query or migrate to the registry module syntax. Which Terraform design principle best explains the chosen response?
Explanation
Correct Answer
Terraform module version metadata differs between registry source addresses and VCS refs. A module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. Pin Git source through a supported ref query or migrate to the registry module syntax.
Incorrect Answers
Each Terraform module has its own variable and local namespace with explicit input boundaries. Terraform module version metadata differs between registry source addresses and VCS refs.
Module composition uses clearly declared inputs and outputs to connect independently reusable stacks. A module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. Terraform module version metadata differs between registry source addresses and VCS refs.
Registry module versions require deliberate constraints to prevent surprise interface changes. A module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. Terraform module version metadata differs between registry source addresses and VCS refs.
Question 387
While protecting branch and account technology, the Terraform team at a retail banking integration team confirms that a remote HCP Terraform plan is queued from VCS but the provider cannot authenticate even though an engineer's local CLI succeeds. The relevant evidence is that run logs show no authorized environment credentials in the workspace execution context. The plan is to configure approved HCP dynamic provider credentials or secure variable sets for the correct workspace. Which Terraform design principle best explains the chosen response?
Explanation
Correct Answer
HCP Terraform remote runs use workspace-supplied credentials rather than inheriting an operator's local shell. Run logs show no authorized environment credentials in the workspace execution context. Configure approved HCP dynamic provider credentials or secure variable sets for the correct workspace.
Incorrect Answers
HCP Terraform can centrally coordinate Terraform execution when workspace settings and permissions are configured. Run logs show no authorized environment credentials in the workspace execution context. HCP Terraform remote runs use workspace-supplied credentials rather than inheriting an operator's local shell.
HCP Terraform variable sets share configuration across selected workspaces and require precise attachment scope. While protecting branch and account technology, hCP Terraform remote runs use workspace-supplied credentials rather than inheriting an operator's local shell.
Moving state to HCP Terraform requires an intentional identity-preserving migration rather than blind reinitialization. Run logs show no authorized environment credentials in the workspace execution context. HCP Terraform remote runs use workspace-supplied credentials rather than inheriting an operator's local shell.
Question 388
While protecting metering and outage response, the Terraform team at an energy infrastructure operator confirms that a network administrator modifies a production ingress rule manually despite a policy requiring peer review for firewall changes. The team proposes to require versioned Terraform changes and reviewed speculative plans before approved apply while limiting direct production mutation. Any change must preserve the approved model contract and show measurable verification evidence. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
An attempted unreviewed rule change is blocked and approved changes have traceable reviewed plans. Provider audit logs show direct configuration writes but no matching reviewed change in the infrastructure repository. Require versioned Terraform changes and reviewed speculative plans before approved apply while limiting direct production mutation.
Incorrect Answers
Terraform configuration and state map the agreed resources and controlled plans reveal subsequent differences. Provider audit logs show direct configuration writes but no matching reviewed change in the infrastructure repository. An attempted unreviewed rule change is blocked and approved changes have traceable reviewed plans.
Both cloud resources plan with their respective provider and no credentials cross an unintended boundary. Provider audit logs show direct configuration writes but no matching reviewed change in the infrastructure repository. An attempted unreviewed rule change is blocked and approved changes have traceable reviewed plans.
Distinct environments use an auditable shared baseline with only approved differences in variables. An attempted unreviewed rule change is blocked and approved changes have traceable reviewed plans.
Question 389
A controlled cloud model operations assessment for a food distribution operator concerns warehouse and supply chain services. Reviewers find that a service module provisions an endpoint whose returned access domain must match an approved suffix, but no Terraform condition checks this. The relevant evidence is that provider returns a successful create while endpoint output points to an unexpected destination. The plan is to use a supported resource postcondition or check assertion for the returned domain and fail review on mismatch. Which Terraform design principle best explains the chosen response?
Explanation
Correct Answer
Terraform custom conditions can test deployment assumptions beyond basic syntax and types. Use a supported resource postcondition or check assertion for the returned domain and fail review on mismatch.
Incorrect Answers
The lifecycle rule create_before_destroy changes replacement ordering but cannot override API uniqueness limits. Terraform custom conditions can test deployment assumptions beyond basic syntax and types.
The sensitive mark affects Terraform display behavior and cannot secure every external consumer. Terraform custom conditions can test deployment assumptions beyond basic syntax and types.
Input variables allow the same configuration to accept controlled environment-specific values. Terraform custom conditions can test deployment assumptions beyond basic syntax and types.
Question 390
For vendor ordering and inventory APIs at a manufacturing supply-chain platform, the infrastructure platform team is investigating the following incident: a module provider block embeds a long-lived Vault token and secrets become available to every repository reader. The team proposes to remove and revoke exposed credentials and authenticate to Vault with an approved short-lived runtime identity. Any change must preserve the approved model contract and show measurable verification evidence. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
No persistent token exists in Git or CI artifacts while authorized plans can retrieve temporary credentials. For vendor ordering and inventory APIs at a manufacturing supply-chain platform, source scanning finds a reusable token committed with Terraform configuration. Remove and revoke exposed credentials and authenticate to Vault with an approved short-lived runtime identity.
Incorrect Answers
Plan shows the production-approved CIDR and missing required inputs fail before mutation. Source scanning finds a reusable token committed with Terraform configuration. No persistent token exists in Git or CI artifacts while authorized plans can retrieve temporary credentials.
Generated names match required patterns for all allowed inputs. Source scanning finds a reusable token committed with Terraform configuration. For the documented incident, the condition is: For vendor ordering and inventory APIs at a manufacturing supply-chain platform, the infrastructure platform team is investigating the following incident: a module provider block embeds a long-lived Vault token and secrets become available to every repository reader.
A replacement becomes available before the original is removed and validation catches name conflicts. Source scanning finds a reusable token committed with Terraform configuration. For the documented incident, the condition is: For vendor ordering and inventory APIs at a manufacturing supply-chain platform, the infrastructure platform team is investigating the following incident: a module provider block embeds a long-lived Vault token and secrets become available to every repository reader.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests
- HashiCorp Terraform Associate 004 Practice Test 37 - 10 Questions (Last Reviewed 23-Oct-2026)
- HashiCorp Terraform Associate 004 Practice Test 38 - 10 Questions (Last Reviewed 22-Oct-2026)
- HashiCorp Terraform Associate 004 Practice Test 39 - 10 Questions (Last Reviewed 21-Oct-2026)
- HashiCorp Terraform Associate 004 Practice Test 40 - 10 Questions (Last Reviewed 20-Oct-2026)
- HashiCorp Terraform Associate 004 Practice Test 41 - 10 Questions (Last Reviewed 19-Oct-2026)
