HashiCorp Terraform Associate Practice Test 23
Question 220
A configuration upgrades the provider version and now a previously valid resource argument is rejected by terraform validate. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The configuration validates under the tested target provider version.
- The workspace is ready for planning without changing managed infrastructure.
- Only one active configuration manages the shared firewall rule.
- Each resource is controlled by the correct virtualization endpoint.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The configuration validates under the tested target provider version. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Test migration in a staging workspace and review all replacement actions.
Incorrect Answers
B:“The workspace is ready for planning without changing managed infrastructure” would address a different Terraform configuration concern; the source instead describes A configuration upgrades the provider version and now a previously valid resource argument is rejected by terraform validate. The appropriate design is to consult the selected provider schema and migration documentation to update the configuration deliberately. Confirm whether the configuration validates under the tested target provider version.
C:“Only one active configuration manages the shared firewall rule” would address a different Terraform configuration concern; the source instead describes A configuration upgrades the provider version and now a previously valid resource argument is rejected by terraform validate. The appropriate design is to consult the selected provider schema and migration documentation to update the configuration deliberately. Confirm whether the configuration validates under the tested target provider version.
D:“Each resource is controlled by the correct virtualization endpoint” would address a different Terraform configuration concern; the source instead describes A configuration upgrades the provider version and now a previously valid resource argument is rejected by terraform validate. The appropriate design is to consult the selected provider schema and migration documentation to update the configuration deliberately. Confirm whether the configuration validates under the tested target provider version.
Question 221
A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Treat refresh and planning as comparisons between configuration, state and current provider observations.
- Configure a clearly named provider alias for the recovery account and select it on recovery resources.
- Use the complete intended provider source address and confirm the publisher namespace before initialization.
- Run terraform init in the current working directory against the repository's declared provider and backend requirements.
Explanation
Correct Answer
D:The proposed intervention addresses the reported Terraform engineering failure: A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. It applies the design choice Run terraform init in the current working directory against the repository's declared provider and backend requirements. Review the primary diagnostic: Check the local working directory's provider requirements and lock. The expected outcome is: The job installs only dependencies appropriate to the current project. The rollout safeguard is: Cache only trusted artifacts and do not skip initialization checks.
Incorrect Answers
A:“Treat refresh and planning as comparisons between configuration, state and current provider observations” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
B:“Configure a clearly named provider alias for the recovery account and select it on recovery resources” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
C:“Use the complete intended provider source address and confirm the publisher namespace before initialization” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
Question 222
A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Check the Git diff for the variable and dependent resource references.
- Inspect init output for required plugin installs and backend initialization.
- Check the local working directory's provider requirements and lock.
- Inspect repository text and history for sensitive provider configuration fields.
- Inspect each resource's provider meta-argument and alias references.
Explanation
Correct Answers
B:This is directly relevant evidence for the reported behavior: Inspect init output for required plugin installs and backend initialization. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Run terraform init in the current working directory against the repository's declared provider and backend requirements. The expected confirmation is The job installs only dependencies appropriate to the current project.
C:This is directly relevant evidence for the reported behavior: Check the local working directory's provider requirements and lock. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Run terraform init in the current working directory against the repository's declared provider and backend requirements. The expected confirmation is The job installs only dependencies appropriate to the current project.
Incorrect Answers
A:“Check the Git diff for the variable and dependent resource references” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
D:“Inspect repository text and history for sensitive provider configuration fields” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
E:“Inspect each resource's provider meta-argument and alias references” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
Question 223
A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Implicit state sharing assumptions can produce references to the wrong resource.
- Reusing arbitrary initialization caches can create missing or incompatible plugins.
- Stale state can mislead incident response if assumed instantly current.
- CLI version constraints alone cannot prevent untested provider upgrades.
Explanation
Correct Answer
B:The reported condition creates the specific potential exposure: Reusing arbitrary initialization caches can create missing or incompatible plugins. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Check the local working directory's provider requirements and lock. Second diagnostic: Inspect init output for required plugin installs and backend initialization.
Incorrect Answers
A:“Implicit state sharing assumptions can produce references to the wrong resource” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
C:“Stale state can mislead incident response if assumed instantly current” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
D:“CLI version constraints alone cannot prevent untested provider upgrades” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
Question 224
A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Cache only trusted artifacts and do not skip initialization checks.
- Run terraform init in the current working directory against the repository's declared provider and backend requirements.
- Keep approved mirrors and enforce dependency-lock checksum verification.
- Use terraform providers lock for documented target platforms and review results.
- Review a plan and apply the approved change because configuration edits do not call provider APIs on their own.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Cache only trusted artifacts and do not skip initialization checks. Together the corrective action and its implementation safeguard need to address the recorded condition: A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. Acceptance requires The job installs only dependencies appropriate to the current project.
B:This is one of the two necessary decisions for a safe design: Run terraform init in the current working directory against the repository's declared provider and backend requirements. Together the corrective action and its implementation safeguard need to address the recorded condition: A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. Acceptance requires The job installs only dependencies appropriate to the current project.
Incorrect Answers
C:“Keep approved mirrors and enforce dependency-lock checksum verification” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
D:“Use terraform providers lock for documented target platforms and review results” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
E:“Review a plan and apply the approved change because configuration edits do not call provider APIs on their own” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
Question 225
A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The job installs only dependencies appropriate to the current project.
- Only authorized automation and reviewers can access encrypted state.
- Both Terraform CLI and providers use independently reviewed compatible versions.
- Approved configuration changes affect infrastructure only after the controlled apply.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The job installs only dependencies appropriate to the current project. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Cache only trusted artifacts and do not skip initialization checks.
Incorrect Answers
B:“Only authorized automation and reviewers can access encrypted state” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
C:“Both Terraform CLI and providers use independently reviewed compatible versions” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
D:“Approved configuration changes affect infrastructure only after the controlled apply” would address a different Terraform configuration concern; the source instead describes A CI job restores its .terraform cache from a different repository and skips init, then fails to load required plugins. The appropriate design is to run terraform init in the current working directory against the repository's declared provider and backend requirements. Confirm whether the job installs only dependencies appropriate to the current project.
Question 226
A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use distinct aliases for multiple configurations of one provider source rather than unnecessary duplicate local names.
- Retain and review the lock file and perform explicit provider version upgrades with plan testing.
- Configure a clearly named provider alias for the recovery account and select it on recovery resources.
- Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs.
Explanation
Correct Answer
D:The proposed intervention addresses the reported Terraform engineering failure: A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. It applies the design choice Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Review the primary diagnostic: Inspect required_providers addresses and provider block settings separately. The expected outcome is: The provider resolves to the right plugin and connects to the intended API endpoint. The rollout safeguard is: Use validated environment settings without committing secrets.
Incorrect Answers
A:“Use distinct aliases for multiple configurations of one provider source rather than unnecessary duplicate local names” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
B:“Retain and review the lock file and perform explicit provider version upgrades with plan testing” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
C:“Configure a clearly named provider alias for the recovery account and select it on recovery resources” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
Question 227
A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. Before choosing a remedy, the team needs independent evidence of the actual root cause. Which TWO checks most directly test this case? (Select TWO.)
- Inspect repository text and history for sensitive provider configuration fields.
- Inspect each resource's provider meta-argument and alias references.
- Compare the resource address in HCL with its remote object ID in state.
- Inspect required_providers addresses and provider block settings separately.
- Check provider authentication and endpoint diagnostics before planning.
Explanation
Correct Answers
D:This is directly relevant evidence for the reported behavior: Inspect required_providers addresses and provider block settings separately. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. The expected confirmation is The provider resolves to the right plugin and connects to the intended API endpoint.
E:This is directly relevant evidence for the reported behavior: Check provider authentication and endpoint diagnostics before planning. Pair it with a separate check from the same case rather than assuming one finding proves the cause. The evidence supports or refutes the change proposal: Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. The expected confirmation is The provider resolves to the right plugin and connects to the intended API endpoint.
Incorrect Answers
A:“Inspect repository text and history for sensitive provider configuration fields” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
B:“Inspect each resource's provider meta-argument and alias references” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
C:“Compare the resource address in HCL with its remote object ID in state” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
Question 228
A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Mistaking initialization for provisioning can skip required change approvals.
- Provider installation does not automatically configure credentials or service endpoints.
- Unqualified provider selection can create resources in the wrong tenant.
- Unexamined provider schema changes can lead to failed or destructive deployments.
Explanation
Correct Answer
B:The reported condition creates the specific potential exposure: Provider installation does not automatically configure credentials or service endpoints. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect required_providers addresses and provider block settings separately. Second diagnostic: Check provider authentication and endpoint diagnostics before planning.
Incorrect Answers
A:“Mistaking initialization for provisioning can skip required change approvals” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
C:“Unqualified provider selection can create resources in the wrong tenant” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
D:“Unexamined provider schema changes can lead to failed or destructive deployments” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
Question 229
A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs.
- Use validated environment settings without committing secrets.
- Keep approved mirrors and enforce dependency-lock checksum verification.
- Run plan and apply only through approved environments.
- Review the provider constraint and run an intentional terraform init -upgrade to select a compatible updated provider version.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Together the corrective action and its implementation safeguard need to address the recorded condition: A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. Acceptance requires The provider resolves to the right plugin and connects to the intended API endpoint.
B:This is one of the two necessary decisions for a safe design: Use validated environment settings without committing secrets. Together the corrective action and its implementation safeguard need to address the recorded condition: A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. Acceptance requires The provider resolves to the right plugin and connects to the intended API endpoint.
Incorrect Answers
C:“Keep approved mirrors and enforce dependency-lock checksum verification” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
D:“Run plan and apply only through approved environments” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
E:“Review the provider constraint and run an intentional terraform init -upgrade to select a compatible updated provider version” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
Question 230
A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The team has implemented an approved Terraform change. Which observed result most directly confirms that the original requirement is now met, beyond a successful command exit code?
- The provider resolves to the right plugin and connects to the intended API endpoint.
- The team can distinguish observed drift from intentional configuration changes.
- The data lookup evaluates against the intended region and account.
- Only one active configuration manages the shared firewall rule.
Explanation
Correct Answer
A:This is the appropriate measurable post-change acceptance criterion: The provider resolves to the right plugin and connects to the intended API endpoint. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Use validated environment settings without committing secrets.
Incorrect Answers
B:“The team can distinguish observed drift from intentional configuration changes” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
C:“The data lookup evaluates against the intended region and account” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.
D:“Only one active configuration manages the shared firewall rule” would address a different Terraform configuration concern; the source instead describes A module consumes a provider that requires an explicit API endpoint, but engineers set only a plugin source in required_providers. The appropriate design is to declare the provider requirement and configure its required runtime arguments in a provider block or supported environment inputs. Confirm whether the provider resolves to the right plugin and connects to the intended API endpoint.