100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 580
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A company uses one VCS monorepo for several independent Terraform root directories and wants each to run only when relevant files change. and Workstream B: A pull request has inconsistent indentation and alignment, but the team does not want to provision any resources. and Workstream C: A child module uses var.environment but the root module declares an environment variable of the same name and passes nothing. Select exactly 3 actions, one addressing each distinct workstream.
- Keep one authoritative managed address per remote object and refactor references accordingly.
- Let the state lock serialize operations and retry after the active writer finishes.
- Configure separate HCP workspaces with correct working directories and path-based VCS run triggers.
- Declare the input in the child and supply environment = var.environment in the root's module call.
- Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized.
- Move to an appropriate shared backend with concurrency controls so both plans use the same authoritative state.
Explanation
Correct Answers
C:For the workstream in which a company uses one VCS monorepo for several independent Terraform root directories and wants each to run only when relevant files change, use this action: Configure separate HCP workspaces with correct working directories and path-based VCS run triggers. Workspace working directories and trigger filters align a monorepo with separate state domains. Verify: Changing one directory triggers its intended workspace without spurious unrelated runs. Limitation: Shared module edits may require additional trigger patterns to update all dependent workspaces.
D:For the workstream in which a child module uses var.environment but the root module declares an environment variable of the same name and passes nothing, use this action: Declare the input in the child and supply environment = var.environment in the root's module call. Explicit variable arguments make the child module interface predictable. Verify: Planning resolves the child's environment value from the explicit module call. Limitation: Input variables are scoped to each module and do not implicitly leak across module boundaries.
E:For the workstream in which a pull request has inconsistent indentation and alignment, but the team does not want to provision any resources, use this action: Run terraform fmt -check for CI verification and terraform fmt to rewrite HCL formatting when authorized. The formatter normalizes the textual style of HCL rather than infrastructure state. Verify: The formatting check succeeds on canonical HCL layout without cloud API changes. Limitation: Formatting neither fixes a missing provider argument nor verifies runtime behavior.
Incorrect Answers
A:This action is appropriate instead for a different, unlisted requirement: An engineer is importing one cloud instance but attempts to assign the same remote object to two Terraform resource addresses. It would be checked by: State inspection shows the imported instance at a single intended address. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
B:This action is appropriate instead for a different, unlisted requirement: Two release pipelines try to update the same remote state simultaneously and one sees a lock-acquisition failure. It would be checked by: Only one run modifies the protected state at a time and the second safely waits or fails. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
F:This action is appropriate instead for a different, unlisted requirement: Two engineers share one project but each stores a different local state file and independently sees new resources in their plans. It would be checked by: Both operators observe the same resource addresses and coordinated state updates. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
Question 581
An infrastructure team faces this specific situation: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. Which Terraform action most directly satisfies the requirement?
- Use the cloud integration block for workspace mapping and authenticate with terraform login securely.
- Back up state, configure HCP cloud integration, and follow the prompted state migration during initialization.
- Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs.
- Configure a valid cloud block for the organization/workspace and authenticate with terraform login.
Explanation
Correct Answer
C:Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Workspace run triggers support sequencing while keeping workspace state boundaries separate. Verify: A successful upstream application can queue the configured downstream workspace run. Limitation: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency.
Incorrect Answers
A:This is linked to a different situation: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. There the relevant decision is: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant decision is: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A team is migrating existing local state into HCP Terraform and wants to avoid accidental duplicate resource creation. There the relevant decision is: Back up state, configure HCP cloud integration, and follow the prompted state migration during initialization. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant decision is: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state. There the relevant decision is: Configure a valid cloud block for the organization/workspace and authenticate with terraform login. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant decision is: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. It would therefore not resolve or assess the case as stated.
Question 582
A reviewer is confirming a change for the following use case: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. The implementation follows this approach: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Which observation or acceptance test most directly verifies the intended result?
- Reviewers can inspect plans and run history while only authorized teams can approve applies.
- A successful upstream application can queue the configured downstream workspace run.
- CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state.
- Violating plans produce visible advisory policy findings while runs remain allowed to continue.
Explanation
Correct Answer
B:Acceptance evidence: A successful upstream application can queue the configured downstream workspace run. It validates the proposed action, use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs, because workspace run triggers support sequencing while keeping workspace state boundaries separate. Remaining limitation: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency.
Incorrect Answers
A:This is linked to a different situation: A compliance team needs centralized access control so reviewers can view runs but only deployers can approve infrastructure changes. There the relevant acceptance is: Reviewers can inspect plans and run history while only authorized teams can approve applies. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant acceptance is: A successful upstream application can queue the configured downstream workspace run. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. There the relevant acceptance is: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant acceptance is: A successful upstream application can queue the configured downstream workspace run. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A security team wants engineers to see policy violations without initially blocking learning-environment applies. There the relevant acceptance is: Violating plans produce visible advisory policy findings while runs remain allowed to continue. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant acceptance is: A successful upstream application can queue the configured downstream workspace run. It would therefore not resolve or assess the case as stated.
Question 583
Consider a proposed solution for this requirement: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. The team plans to do the following: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Which limitation or operational caveat must remain in the review?
- Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency.
- Migration needs destination permissions, correct workspace identity, and validation of resulting state.
- Run creation and apply still require proper permissions and policy checks.
- Registry visibility and version release management must be governed; publishing alone does not make code correct.
Explanation
Correct Answer
A:The limitation is run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency. The proposed change is use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Validate it by checking a successful upstream application can queue the configured downstream workspace run. Workspace run triggers support sequencing while keeping workspace state boundaries separate.
Incorrect Answers
B:This is linked to a different situation: A team is migrating existing local state into HCP Terraform and wants to avoid accidental duplicate resource creation. There the relevant limitation is: Migration needs destination permissions, correct workspace identity, and validation of resulting state. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant limitation is: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: An automation tool needs to submit a Terraform plan without relying on a VCS webhook workflow. There the relevant limitation is: Run creation and apply still require proper permissions and policy checks. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant limitation is: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: An organization wants approved modules discoverable by many teams without copying source trees into every repo. There the relevant limitation is: Registry visibility and version release management must be governed; publishing alone does not make code correct. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant limitation is: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency. It would therefore not resolve or assess the case as stated.
Question 584
The team is reviewing a Terraform implementation for this case: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Assume every push to an unrelated repository automatically starts an HCP run without a VCS connection.
- Use a variable set as a substitute for storing and versioning reusable module code.
- Assume two workspaces share one state file simply because a run trigger connects them.
- Assume terraform login alone attaches an arbitrary directory to a specific HCP workspace.
Explanation
Correct Answer
C:Reject the assumption: Assume two workspaces share one state file simply because a run trigger connects them. Instead, use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Workspace run triggers support sequencing while keeping workspace state boundaries separate. Acceptance evidence: A successful upstream application can queue the configured downstream workspace run.
Incorrect Answers
A:This is linked to a different situation: A development team connects one infrastructure repository to an HCP Terraform workspace and expects reviewed commits to trigger plans. There the relevant misconception is: Assume every push to an unrelated repository automatically starts an HCP run without a VCS connection. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant misconception is: Assume two workspaces share one state file simply because a run trigger connects them. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: An organization wants approved modules discoverable by many teams without copying source trees into every repo. There the relevant misconception is: Use a variable set as a substitute for storing and versioning reusable module code. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant misconception is: Assume two workspaces share one state file simply because a run trigger connects them. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A workstation has Terraform CLI installed but a team wants the local CLI to invoke HCP Terraform remote runs and manage state. There the relevant misconception is: Assume terraform login alone attaches an arbitrary directory to a specific HCP workspace. For the question's actual requirement — A team needs one shared network workspace to finish before dependent application workspaces start their own updates. — the specifically relevant misconception is: Assume two workspaces share one state file simply because a run trigger connects them. It would therefore not resolve or assess the case as stated.
Question 585
A Terraform platform team is coordinating 2 independent decisions. Workstream A: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. and Workstream B: A developer needs to format all Terraform files in nested module directories as part of a repository cleanup. Select exactly 2 actions, one addressing each distinct workstream.
- Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs.
- Expect the default local backend to manage a terraform.tfstate file in the working directory.
- Use a reviewed removed block with destroy = false or a careful terraform state rm operation to forget its binding.
- Use a conditional expression over a declared environment variable to select the appropriate hostname.
- Run terraform fmt -recursive on the intended directory tree after reviewing the file scope.
Explanation
Correct Answers
A:For the workstream in which a team needs one shared network workspace to finish before dependent application workspaces start their own updates, use this action: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. Workspace run triggers support sequencing while keeping workspace state boundaries separate. Verify: A successful upstream application can queue the configured downstream workspace run. Limitation: Run triggers coordinate workspace runs but do not automatically express every cross-workspace data dependency.
E:For the workstream in which a developer needs to format all Terraform files in nested module directories as part of a repository cleanup, use this action: Run terraform fmt -recursive on the intended directory tree after reviewing the file scope. Recursive formatting applies standard HCL layout to child directories. Verify: The command rewrites formatting of Terraform configuration files in nested directories. Limitation: Style changes should be reviewed and committed; formatting does not upgrade modules.
Incorrect Answers
B:This option addresses a separate requirement: A developer uses a fresh local Terraform directory with no backend block and asks where state will be written after apply. Evidence for that other requirement would be a successful local apply creates or updates a locally persisted state snapshot for the selected workspace; neither listed workstream asks for it.
C:This option addresses a separate requirement: A managed object should stop being controlled by Terraform while remaining physically available. Evidence for that other requirement would be terraform no longer lists the address as managed, while the remote object remains available; neither listed workstream asks for it.
D:This option addresses a separate requirement: A deployment needs to choose a service hostname based on whether the environment is production. Evidence for that other requirement would be the plan selects the production hostname only when the condition evaluates true; neither listed workstream asks for it.
Question 586
An infrastructure team faces this specific situation: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. Which Terraform action most directly satisfies the requirement?
- Use the cloud integration block for workspace mapping and authenticate with terraform login securely.
- Organize related workspaces into HCP Terraform projects and assign team-level project permissions.
- Use a supported HCP Terraform API-driven workflow and upload a configuration version to the intended workspace.
- Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs.
Explanation
Correct Answer
A:Use the cloud integration block for workspace mapping and authenticate with terraform login securely. HCP CLI integration separates workspace association and secure user authentication. Verify: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. Limitation: CLI tokens are sensitive and workspace permissions still control access to plan and apply.
Incorrect Answers
B:This is linked to a different situation: An organization has dozens of workspaces for finance and research teams with distinct access requirements. There the relevant decision is: Organize related workspaces into HCP Terraform projects and assign team-level project permissions. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant decision is: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: An automation tool needs to submit a Terraform plan without relying on a VCS webhook workflow. There the relevant decision is: Use a supported HCP Terraform API-driven workflow and upload a configuration version to the intended workspace. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant decision is: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team needs one shared network workspace to finish before dependent application workspaces start their own updates. There the relevant decision is: Use suitable HCP Terraform workspace run triggers where supported to coordinate dependent runs. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant decision is: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. It would therefore not resolve or assess the case as stated.
Question 587
A reviewer is confirming a change for the following use case: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. The implementation follows this approach: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. Which observation or acceptance test most directly verifies the intended result?
- CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state.
- Violating plans produce visible advisory policy findings while runs remain allowed to continue.
- Reviewers can inspect plans and run history while only authorized teams can approve applies.
- The intended finance and research teams have scoped access to their respective project workspaces.
Explanation
Correct Answer
A:Acceptance evidence: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. It validates the proposed action, use the cloud integration block for workspace mapping and authenticate with terraform login securely, because hCP CLI integration separates workspace association and secure user authentication. Remaining limitation: CLI tokens are sensitive and workspace permissions still control access to plan and apply.
Incorrect Answers
B:This is linked to a different situation: A security team wants engineers to see policy violations without initially blocking learning-environment applies. There the relevant acceptance is: Violating plans produce visible advisory policy findings while runs remain allowed to continue. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant acceptance is: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A compliance team needs centralized access control so reviewers can view runs but only deployers can approve infrastructure changes. There the relevant acceptance is: Reviewers can inspect plans and run history while only authorized teams can approve applies. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant acceptance is: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: An organization has dozens of workspaces for finance and research teams with distinct access requirements. There the relevant acceptance is: The intended finance and research teams have scoped access to their respective project workspaces. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant acceptance is: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. It would therefore not resolve or assess the case as stated.
Question 588
Consider a proposed solution for this requirement: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. The team plans to do the following: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. Which limitation or operational caveat must remain in the review?
- Advisory is not the right choice for mandatory production enforcement requirements.
- CLI tokens are sensitive and workspace permissions still control access to plan and apply.
- Workspace configuration and execution permissions must be set before production runs can be trusted.
- Conflicting variable definitions obey precedence rules; scope alone does not guarantee a value wins.
Explanation
Correct Answer
B:The limitation is cLI tokens are sensitive and workspace permissions still control access to plan and apply. The proposed change is use the cloud integration block for workspace mapping and authenticate with terraform login securely. Validate it by checking cLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. HCP CLI integration separates workspace association and secure user authentication.
Incorrect Answers
A:This is linked to a different situation: A security team wants engineers to see policy violations without initially blocking learning-environment applies. There the relevant limitation is: Advisory is not the right choice for mandatory production enforcement requirements. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant limitation is: CLI tokens are sensitive and workspace permissions still control access to plan and apply. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A small team needs managed Terraform state and remotely executed infrastructure runs with shared visibility rather than running only from laptops. There the relevant limitation is: Workspace configuration and execution permissions must be set before production runs can be trusted. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant limitation is: CLI tokens are sensitive and workspace permissions still control access to plan and apply. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A platform administrator must reuse one nonsecret provider configuration variable across multiple workspaces in the same HCP project. There the relevant limitation is: Conflicting variable definitions obey precedence rules; scope alone does not guarantee a value wins. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant limitation is: CLI tokens are sensitive and workspace permissions still control access to plan and apply. It would therefore not resolve or assess the case as stated.
Question 589
The team is reviewing a Terraform implementation for this case: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Use a variable set as a substitute for storing and versioning reusable module code.
- Set every workspace to run on any repository push and expect monorepo changes never create duplicate runs.
- Put the user API token directly into source-controlled HCL as the required login mechanism.
- Mark a policy advisory and assume it can never permit a noncompliant apply.
Explanation
Correct Answer
C:Reject the assumption: Put the user API token directly into source-controlled HCL as the required login mechanism. Instead, use the cloud integration block for workspace mapping and authenticate with terraform login securely. HCP CLI integration separates workspace association and secure user authentication. Acceptance evidence: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state.
Incorrect Answers
A:This is linked to a different situation: An organization wants approved modules discoverable by many teams without copying source trees into every repo. There the relevant misconception is: Use a variable set as a substitute for storing and versioning reusable module code. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant misconception is: Put the user API token directly into source-controlled HCL as the required login mechanism. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A company uses one VCS monorepo for several independent Terraform root directories and wants each to run only when relevant files change. There the relevant misconception is: Set every workspace to run on any repository push and expect monorepo changes never create duplicate runs. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant misconception is: Put the user API token directly into source-controlled HCL as the required login mechanism. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A security team wants engineers to see policy violations without initially blocking learning-environment applies. There the relevant misconception is: Mark a policy advisory and assume it can never permit a noncompliant apply. For the question's actual requirement — A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. — the specifically relevant misconception is: Put the user API token directly into source-controlled HCL as the required login mechanism. It would therefore not resolve or assess the case as stated.
Question 590
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control. and Workstream B: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. and Workstream C: Two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses. Select exactly 3 actions, one addressing each distinct workstream.
- Treat each module call as a distinct instance with its own passed inputs and resource addresses.
- Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
- Protect state storage and consider ephemeral flow or provider-supported write-only arguments where appropriate, not sensitive alone.
- Select the correct workspace/backend state and run terraform destroy only after reviewing its destruction plan.
- Back up the current state and use terraform init -migrate-state when moving to the newly configured backend.
- Use the cloud integration block for workspace mapping and authenticate with terraform login securely.
Explanation
Correct Answers
A:For the workstream in which two module instances share the same source but have different input maps, and an engineer expects identical endpoint addresses, use this action: Treat each module call as a distinct instance with its own passed inputs and resource addresses. Each module call instantiates a distinct namespace for the same reusable configuration. Verify: The plan displays separate module.alpha and module.beta resource addresses with their respective values. Limitation: Reusing module source is code reuse, not infrastructure-instance reuse.
B:For the workstream in which a newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently, use this action: Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module. Terraform can orchestrate multiple service APIs by loading an appropriate provider for each distinct resource type. Verify: The plan shows objects from both provider schemas and does not misroute requests across APIs. Limitation: The existence of a provider does not prove its API endpoints or credentials are reachable in every environment.
F:For the workstream in which a local Terraform root must be connected to a specific HCP Terraform workspace without storing an API token in version control, use this action: Use the cloud integration block for workspace mapping and authenticate with terraform login securely. HCP CLI integration separates workspace association and secure user authentication. Verify: CLI commands authenticate to the correct HCP organization/workspace and work with managed remote state. Limitation: CLI tokens are sensitive and workspace permissions still control access to plan and apply.
Incorrect Answers
C:This action is appropriate instead for a different, unlisted requirement: An application secret is supplied as a Terraform variable marked sensitive, and a teammate claims it cannot enter a saved state file. It would be checked by: Inspect the chosen mechanism and verify secrets do not appear in plan/state artifacts where omission is required. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
D:This action is appropriate instead for a different, unlisted requirement: A disposable integration environment must be removed without unintentionally deleting shared infrastructure in another state. It would be checked by: The destruction plan lists the managed objects targeted in that state, not arbitrary cloud resources. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
E:This action is appropriate instead for a different, unlisted requirement: A migration changes a backend location but the team must preserve all existing state bindings. It would be checked by: The destination backend reflects the prior managed resource addresses and lineage after migration. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests