HashiCorp Terraform Associate Practice Test 24
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.
Question 231
A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state.
- Use terraform init for backend and provider/module setup, then inspect a plan and apply separately when authorized.
- Preserve an appropriate provider configuration until managed resources are safely migrated or removed from state ownership.
- Configure a clearly named provider alias for the recovery account and select it on recovery resources.
Explanation
Correct Answer
A:The proposed intervention addresses the reported Terraform engineering failure: A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. It applies the design choice Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Review the primary diagnostic: Check the state snapshot timestamp and managed resource identities. The expected outcome is: Operators distinguish last known state from live infrastructure observations. The rollout safeguard is: Schedule read-only drift checks without giving them unreviewed apply authority.
Incorrect Answers
B:“Use terraform init for backend and provider/module setup, then inspect a plan and apply separately when authorized” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
C:“Preserve an appropriate provider configuration until managed resources are safely migrated or removed from state ownership” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
D:“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 cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
Question 232
A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. 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 state snapshot timestamp and managed resource identities.
- Compare the resource address in HCL with its remote object ID in state.
- Compare provider current reads from a plan with state values.
- Check the Git diff for the variable and dependent resource references.
- Inspect init output for installed providers and initialized backend status.
Explanation
Correct Answers
A:This is directly relevant evidence for the reported behavior: Check the state snapshot timestamp and managed resource identities. 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: Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. The expected confirmation is Operators distinguish last known state from live infrastructure observations.
C:This is directly relevant evidence for the reported behavior: Compare provider current reads from a plan with state values. 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: Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. The expected confirmation is Operators distinguish last known state from live infrastructure observations.
Incorrect Answers
B:“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 cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
D:“Check the Git diff for the variable and dependent resource references” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
E:“Inspect init output for installed providers and initialized backend status” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
Question 233
A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Unsupported API actions cannot be reliably managed merely by writing arbitrary HCL.
- Implicit alias inheritance can silently fail or attach resources incorrectly.
- Stale state can mislead incident response if assumed instantly current.
- Duplicate state ownership can cause oscillating security rules.
Explanation
Correct Answer
C:The reported condition creates the specific potential exposure: Stale state can mislead incident response if assumed instantly current. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Check the state snapshot timestamp and managed resource identities. Second diagnostic: Compare provider current reads from a plan with state values.
Incorrect Answers
A:“Unsupported API actions cannot be reliably managed merely by writing arbitrary HCL” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
B:“Implicit alias inheritance can silently fail or attach resources incorrectly” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
D:“Duplicate state ownership can cause oscillating security rules” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
Question 234
A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Test module invocation with both default and aliased provider instances.
- Schedule read-only drift checks without giving them unreviewed apply authority.
- Map affected resources explicitly to the intended provider instance and verify their target endpoint.
- Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state.
- Use named aliases with tests for expected account IDs.
Explanation
Correct Answers
B:This is one of the two necessary decisions for a safe design: Schedule read-only drift checks without giving them unreviewed apply authority. Together the corrective action and its implementation safeguard need to address the recorded condition: A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. Acceptance requires Operators distinguish last known state from live infrastructure observations.
D:This is one of the two necessary decisions for a safe design: Use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Together the corrective action and its implementation safeguard need to address the recorded condition: A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. Acceptance requires Operators distinguish last known state from live infrastructure observations.
Incorrect Answers
A:“Test module invocation with both default and aliased provider instances” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
C:“Map affected resources explicitly to the intended provider instance and verify their target endpoint” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
E:“Use named aliases with tests for expected account IDs” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
Question 235
A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. 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?
- Terraform runs authenticate using scoped identities with no secrets committed to code.
- Operators distinguish last known state from live infrastructure observations.
- The plan uses available provider operations against the intended service API.
- The child resources use the intended aliased provider configuration.
Explanation
Correct Answer
B:This is the appropriate measurable post-change acceptance criterion: Operators distinguish last known state from live infrastructure observations. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Schedule read-only drift checks without giving them unreviewed apply authority.
Incorrect Answers
A:“Terraform runs authenticate using scoped identities with no secrets committed to code” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
C:“The plan uses available provider operations against the intended service API” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
D:“The child resources use the intended aliased provider configuration” would address a different Terraform configuration concern; the source instead describes A cloud operator expects Terraform state to be a live inventory refreshed continuously even if nobody runs Terraform. The appropriate design is to use a deliberate provider refresh or plan workflow when current remote attributes need comparison with recorded state. Confirm whether operators distinguish last known state from live infrastructure observations.
Question 236
A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Retain and review the lock file and perform explicit provider version upgrades with plan testing.
- Preserve secure state because it binds managed resource addresses to remote identifiers and recorded attributes.
- Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared.
- Configure a clearly named provider alias for the recovery account and select it on recovery resources.
Explanation
Correct Answer
C:The proposed intervention addresses the reported Terraform engineering failure: A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. It applies the design choice Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Review the primary diagnostic: Inspect independent backend locations and root output definitions. The expected outcome is: One stack obtains the intended identifier while keeping state boundaries independent. The rollout safeguard is: Prefer explicit outputs and avoid exposing unnecessary remote-state secrets.
Incorrect Answers
A:“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 team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
B:“Preserve secure state because it binds managed resource addresses to remote identifiers and recorded attributes” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
D:“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 team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
Question 237
A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. 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 remote state storage access policies and encryption settings.
- Inspect provider selection on the data block and expected region.
- Inspect required_providers version constraints and committed lock-file selections.
- Check data source lookup keys and cross-workspace access permissions.
- Inspect independent backend locations and root output definitions.
Explanation
Correct Answers
D:This is directly relevant evidence for the reported behavior: Check data source lookup keys and cross-workspace access permissions. 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: Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. The expected confirmation is One stack obtains the intended identifier while keeping state boundaries independent.
E:This is directly relevant evidence for the reported behavior: Inspect independent backend locations and root output definitions. 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: Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. The expected confirmation is One stack obtains the intended identifier while keeping state boundaries independent.
Incorrect Answers
A:“Inspect remote state storage access policies and encryption settings” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
B:“Inspect provider selection on the data block and expected region” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
C:“Inspect required_providers version constraints and committed lock-file selections” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
Question 238
A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. 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.
- Lost state mappings may lead to duplicate creates or mistaken replacement plans.
- Duplicate state ownership can cause oscillating security rules.
- Reusing arbitrary initialization caches can create missing or incompatible plugins.
Explanation
Correct Answer
A:The reported condition creates the specific potential exposure: Implicit state sharing assumptions can produce references to the wrong resource. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect independent backend locations and root output definitions. Second diagnostic: Check data source lookup keys and cross-workspace access permissions.
Incorrect Answers
B:“Lost state mappings may lead to duplicate creates or mistaken replacement plans” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
C:“Duplicate state ownership can cause oscillating security rules” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
D:“Reusing arbitrary initialization caches can create missing or incompatible plugins” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
Question 239
A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. A reviewer asks for BOTH a targeted technical response and a corresponding change-control safeguard. Which TWO actions together meet that requirement? (Select TWO.)
- Review a plan and apply the approved change because configuration edits do not call provider APIs on their own.
- Use a restricted encrypted backend and avoid committing state to Git.
- Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared.
- Prefer explicit outputs and avoid exposing unnecessary remote-state secrets.
- Test module invocation with both default and aliased provider instances.
Explanation
Correct Answers
C:This is one of the two necessary decisions for a safe design: Publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Together the corrective action and its implementation safeguard need to address the recorded condition: A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. Acceptance requires One stack obtains the intended identifier while keeping state boundaries independent.
D:This is one of the two necessary decisions for a safe design: Prefer explicit outputs and avoid exposing unnecessary remote-state secrets. Together the corrective action and its implementation safeguard need to address the recorded condition: A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. Acceptance requires One stack obtains the intended identifier while keeping state boundaries independent.
Incorrect Answers
A:“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 team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
B:“Use a restricted encrypted backend and avoid committing state to Git” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
E:“Test module invocation with both default and aliased provider instances” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
Question 240
A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. 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?
- Only one active configuration manages the shared firewall rule.
- One stack obtains the intended identifier while keeping state boundaries independent.
- Both Terraform CLI and providers use independently reviewed compatible versions.
- Terraform retains the correct association with the existing remote resource.
Explanation
Correct Answer
B:This is the appropriate measurable post-change acceptance criterion: One stack obtains the intended identifier while keeping state boundaries independent. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Prefer explicit outputs and avoid exposing unnecessary remote-state secrets.
Incorrect Answers
A:“Only one active configuration manages the shared firewall rule” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
C:“Both Terraform CLI and providers use independently reviewed compatible versions” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.
D:“Terraform retains the correct association with the existing remote resource” would address a different Terraform configuration concern; the source instead describes A team creates an AWS resource in one root module and uses a different root module with a data lookup to read it, but assumes the two plans share state automatically. The appropriate design is to publish the required stable outputs or lookups through a governed interface rather than assuming root module state is shared. Confirm whether one stack obtains the intended identifier while keeping state boundaries independent.