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 15
Question 140
During an authorized design and operations review at a public transit administration, engineers supporting route planning and passenger dashboards discover that a team marks a database password variable sensitive and assumes no secret will be written to Terraform state or saved plans. The team proposes to use supported ephemeral inputs and resource write-only arguments where the provider supports them and secure existing state access. The team must preserve approved data handling and avoid widening access to sensitive features. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
Supported temporary secret values are omitted from plans and state for the specific write-only path. Sensitive conceals values in UI but only ephemeral and write-only contexts can avoid persistence. Use supported ephemeral inputs and resource write-only arguments where the provider supports them and secure existing state access.
Incorrect Answers
Disallowed region inputs fail early and approved regions proceed through validate and plan. Supported temporary secret values are omitted from plans and state for the specific write-only path.
Plan shows the production-approved CIDR and missing required inputs fail before mutation. Supported temporary secret values are omitted from plans and state for the specific write-only path. Sensitive conceals values in UI but only ephemeral and write-only contexts can avoid persistence.
An unauthorized rule deviation is detected and the approved policy can be reconciled. Supported temporary secret values are omitted from plans and state for the specific write-only path.
Question 141
While protecting route planning and passenger dashboards, the Terraform team at a public transit administration confirms that a CI pipeline deletes .terraform.lock.hcl on each run and a previously tested provider unexpectedly changes during redeployment. Confirming evidence shows that build logs show provider selection repeated without the committed checksums and versions. 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
Commit and retain the dependency lock file and initialize without unreviewed provider upgrades. Multiple clean builds use the same selected provider versions until an explicitly reviewed upgrade. Build logs show provider selection repeated without the committed checksums and versions. The lockfile records selected providers and integrity checks for reproducible initialization.
Incorrect Answers
Commit and retain the dependency lock file and initialize without unreviewed provider upgrades. A subsequent plan recognizes the existing object under the new address without replacing it. The intervention addresses the fault, but the proposed test checks a different outcome. Multiple clean builds use the same selected provider versions until an explicitly reviewed upgrade.
Commit and retain the dependency lock file and initialize without unreviewed provider upgrades. Initialization installs only the intended reviewed plugin with the correct registry source identity. That uses the intended change yet measures the wrong result. Multiple clean builds use the same selected provider versions until an explicitly reviewed upgrade.
Configure an aliased provider instance and attach the intended provider alias to the second resource. The reviewed plan targets the specified regions independently with the expected credentials. Commit and retain the dependency lock file and initialize without unreviewed provider upgrades; Multiple clean builds use the same selected provider versions until an explicitly reviewed upgrade.
Question 142
At a geospatial analytics startup, a change advisory board is reviewing ML input and inference paths for satellite data ingest and model systems. The reported issue is that an HCP Terraform organization groups production finance workspaces with general shared testing projects and inherits broad team access. The proposed remedy is to organize workspaces into appropriate HCP projects and assign scoped project and workspace team access. 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
Project and workspace permissions expose production runs to staff outside the responsible team. At a geospatial analytics startup, an HCP Terraform organization groups production finance workspaces with general shared testing projects and inherits broad team access. Organize workspaces into appropriate HCP projects and assign scoped project and workspace team access.
Incorrect Answers
HCP workspace is initially empty while a local state file already tracks live resources. At a geospatial analytics startup, project and workspace permissions expose production runs to staff outside the responsible team. Organize workspaces into appropriate HCP projects and assign scoped project and workspace team access.
CLI run target and backend metadata resolve to a different workspace than the approved deployment request. Organize workspaces into appropriate HCP projects and assign scoped project and workspace team access.
HCP run history lacks approved changes while cloud audit records show workstation-origin operations. Project and workspace permissions expose production runs to staff outside the responsible team. Organize workspaces into appropriate HCP projects and assign scoped project and workspace team access.
Question 143
During an authorized design and operations review at a public transit administration, engineers supporting route planning and passenger dashboards discover that a branch passes terraform fmt but contains an invalid reference to a nonexistent module output. The relevant evidence is that the file layout is formatted yet terraform validate reports an undeclared reference. The plan is to use terraform validate for structural checks in addition to terraform fmt for formatting. Which Terraform design principle best explains the chosen response?
Explanation
Correct Answer
Formatting adjusts source layout but does not prove configuration references or expressions are valid. Use terraform validate for structural checks in addition to terraform fmt for formatting.
Incorrect Answers
The core Terraform workflow separates configuration intent and reviewed execution from actual infrastructure mutation. Formatting adjusts source layout but does not prove configuration references or expressions are valid.
Terraform validation tests configuration correctness separately from creating a cloud execution plan. Formatting adjusts source layout but does not prove configuration references or expressions are valid.
Backend changes require deliberate reinitialization and sometimes state migration rather than blind planning. Formatting adjusts source layout but does not prove configuration references or expressions are valid.
Question 144
During an authorized design and operations review at a telecom platform operator, engineers supporting subscriber portals and network inventory discover that a module declaration adds version=1.2.0 while its source is a Git URL rather than a registry address. Observation: initialization reports unsupported version argument for a nonregistry module source. Only a controlled and reversible ML workflow change fits the approved release window. Which intervention most directly addresses the underlying Terraform 1.12 infrastructure workflow failure?
Explanation
Correct Answer
Pin Git source through a supported ref query or migrate to the registry module syntax. During an authorized design and operations review at a telecom platform operator, initialization reports unsupported version argument for a nonregistry module source. Initialization fetches the intended source revision with a supported versioning mechanism.
Incorrect Answers
Pass the explicit subnet output from the network module into the compute module. During an authorized design and operations review at a telecom platform operator, initialization reports unsupported version argument for a nonregistry module source. Pin Git source through a supported ref query or migrate to the registry module syntax.
Keep secret data out of root outputs and enforce sensitive propagation and consumer controls. During an authorized design and operations review at a telecom platform operator, initialization reports unsupported version argument for a nonregistry module source. Pin Git source through a supported ref query or migrate to the registry module syntax.
Pin a reviewed module release tag or commit reference and validate compatibility before updating. Initialization reports unsupported version argument for a nonregistry module source. Pin Git source through a supported ref query or migrate to the registry module syntax.
Question 145
For freight scheduling and depot services at a logistics technology company, the infrastructure platform team is investigating the following incident: a compute module is reused in a second environment but its required network input is omitted. The proposed remedy is to pass the explicit subnet output from the network module into the compute module. Any change must preserve the approved model contract and show measurable verification evidence. Which finding would best distinguish the suspected cause from nearby Terraform configuration issues?
Explanation
Correct Answer
Validate reports missing module argument even though the underlying network resource exists elsewhere. A compute module is reused in a second environment but its required network input is omitted. The compute resource plans against the correct network output and module dependencies are inferred.
Incorrect Answers
Validation identifies no variable declaration inside the child despite the parent defining a similarly named value. Validate reports missing module argument even though the underlying network resource exists elsewhere.
CI logs display a value derived from sensitive content when a root output is printed. Validate reports missing module argument even though the underlying network resource exists elsewhere.
Initialization log shows a new module version and plan errors on a removed output name. Validate reports missing module argument even though the underlying network resource exists elsewhere.
Question 146
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 after a cloud VM is imported a minimal resource block omits important existing immutable settings and the first plan shows replacement. The team proposes to inspect imported attributes and complete the intended reviewed resource configuration before apply. 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
The first post-import plan is no-op or limited to separately approved changes without deleting the live VM. After a cloud VM is imported a minimal resource block omits important existing immutable settings and the first plan shows replacement. Inspect imported attributes and complete the intended reviewed resource configuration before apply.
Incorrect Answers
State moves or removals follow recorded commands with a recoverable state snapshot. The first post-import plan is no-op or limited to separately approved changes without deleting the live VM.
Terraform state maps the existing database to the intended address and later plans avoid duplicate creation. After a cloud VM is imported a minimal resource block omits important existing immutable settings and the first plan shows replacement. The first post-import plan is no-op or limited to separately approved changes without deleting the live VM.
New runs use normal logging and incident traces are stored under controlled access. After a cloud VM is imported a minimal resource block omits important existing immutable settings and the first plan shows replacement. The first post-import plan is no-op or limited to separately approved changes without deleting the live VM.
Question 147
While protecting analytics and private data feeds, the Terraform team at a market data company confirms that an application resource uses a manually copied subnet ID and deploys against the wrong network after an environment rebuild. The proposed remedy is to reference the managed subnet attribute and let Terraform infer the dependency. Service owners require a reproducible result without unsafe or unapproved production testing. Which finding would best distinguish the suspected cause from nearby Terraform configuration issues?
Explanation
Correct Answer
Terraform references show a literal subnet ID rather than the subnet resource attribute from the same configuration. An application resource uses a manually copied subnet ID and deploys against the wrong network after an environment rebuild. Reference the managed subnet attribute and let Terraform infer the dependency.
Incorrect Answers
Plan shows deletion of the only active endpoint before a replacement is provisioned. Terraform references show a literal subnet ID rather than the subnet resource attribute from the same configuration. Reference the managed subnet attribute and let Terraform infer the dependency.
CI log includes a secret value even though Terraform UI redacted the sensitive output earlier. Reference the managed subnet attribute and let Terraform infer the dependency.
Source scanning finds a reusable token committed with Terraform configuration. Terraform references show a literal subnet ID rather than the subnet resource attribute from the same configuration. Reference the managed subnet attribute and let Terraform infer the dependency.
Question 148
While protecting freight scheduling and depot services, the Terraform team at a logistics technology company confirms that two engineers copy a local state file into separate machines and independently apply changes to the same resource set. Confirming evidence shows that both state snapshots contain different serials and each claims authority over the same infrastructure objects. Service owners require a reproducible result without unsafe or unapproved production testing. Which implementation paired with its verification outcome addresses the same fault?
Explanation
Correct Answer
Choose a controlled shared backend with state locking and reconcile the current authoritative state before further applies. Only a single consistent current state snapshot is used for future authorized operations. Both state snapshots contain different serials and each claims authority over the same infrastructure objects. Terraform state requires a consistent ownership map so concurrent writers do not make conflicting assumptions.
Incorrect Answers
Choose a controlled shared backend with state locking and reconcile the current authoritative state before further applies. The reviewed plan targets the specified regions independently with the expected credentials. That uses the intended change yet measures the wrong result. Only a single consistent current state snapshot is used for future authorized operations.
Choose a controlled shared backend with state locking and reconcile the current authoritative state before further applies. The needed provider plugin is installed and the subsequent plan can ask the provider to evaluate resources. The remedy may be appropriate, but that check does not establish the required recovery. Only a single consistent current state snapshot is used for future authorized operations.
Configure the provider's supported authentication through scoped workload identity and check the effective execution principal. Plan can query resources with the intended identity while privileged operations remain limited by policy. Choose a controlled shared backend with state locking and reconcile the current authoritative state before further applies; Only a single consistent current state snapshot is used for future authorized operations.
Question 149
During an authorized design and operations review at a manufacturing supply-chain platform, engineers supporting vendor ordering and inventory APIs discover that an apply fails intermittently with an opaque provider error and the default console output cannot distinguish token failure from timeout. The team proposes to enable supported TF_LOG level and TF_LOG_PATH for a controlled repro with secret-safe handling. Only a controlled and reversible ML workflow change fits the approved release window. Which post-change observation would establish the required infrastructure or configuration outcome?
Explanation
Correct Answer
A sanitized debug trace identifies the failed operation and temporary logs are removed under policy. Terraform verbose logging can expose sensitive details and should be scoped to incident diagnosis. Enable supported TF_LOG level and TF_LOG_PATH for a controlled repro with secret-safe handling.
Incorrect Answers
New runs use normal logging and incident traces are stored under controlled access. A sanitized debug trace identifies the failed operation and temporary logs are removed under policy.
The correct state-mapped provider ID is confirmed without editing raw state files. A sanitized debug trace identifies the failed operation and temporary logs are removed under policy. Terraform verbose logging can expose sensitive details and should be scoped to incident diagnosis.
State moves or removals follow recorded commands with a recoverable state snapshot. A sanitized debug trace identifies the failed operation and temporary logs are removed under policy.
Question 150
For branch and account technology at a retail banking integration team, the infrastructure platform team is investigating the following incident: two workspaces configure a remote object-store backend with the same state path key for unrelated environments. The proposed remedy is to assign independent state keys or workspaces with strict access boundaries and verify their actual remote state identity. Any change must preserve the approved model contract and show measurable verification evidence. Which finding would best distinguish the suspected cause from nearby Terraform configuration issues?
Explanation
Correct Answer
Plan for staging shows destructive changes on production resource IDs. Two workspaces configure a remote object-store backend with the same state path key for unrelated environments. Each environment plan shows only its own managed objects and account resources.
Incorrect Answers
Backend folder has no state history while a local terraform.tfstate still maps production resources. Plan for staging shows destructive changes on production resource IDs.
Removing the resource block from configuration causes plan to schedule DNS record deletion. Plan for staging shows destructive changes on production resource IDs.
Runner audit shows an active workflow and lock ID belonging to the current legitimate writer. Plan for staging shows destructive changes on production resource IDs.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests
- HashiCorp Terraform Associate 004 Practice Test 13 - 10 Questions (Last Reviewed 16-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 14 - 10 Questions (Last Reviewed 15-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 15 - 10 Questions (Last Reviewed 14-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 16 - 10 Questions (Last Reviewed 13-Nov-2026)
- HashiCorp Terraform Associate 004 Practice Test 17 - 10 Questions (Last Reviewed 12-Nov-2026)
