HashiCorp Terraform Associate Practice Test 53
Question 520
A child module creates a managed SQL database but the root tries to set the engine size by directly assigning to a child local value rather than an input variable. 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?
- Initialization retrieves the exact reviewed module version.
- The local module resolves consistently on clean workstations and CI runners.
- Consumers obtain the endpoint without secret data exposure.
- The child receives the approved engine size through its public interface.
Explanation
Correct Answer
D:This is the appropriate measurable post-change acceptance criterion: The child receives the approved engine size through its public interface. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Document input defaults and enforce supported size constraints.
Incorrect Answers
A:“Initialization retrieves the exact reviewed module version” would address a different Terraform configuration concern; the source instead describes A child module creates a managed SQL database but the root tries to set the engine size by directly assigning to a child local value rather than an input variable. The appropriate design is to expose a typed input variable in the child and pass the engine size through the module block. Confirm whether the child receives the approved engine size through its public interface.
B:“The local module resolves consistently on clean workstations and CI runners” would address a different Terraform configuration concern; the source instead describes A child module creates a managed SQL database but the root tries to set the engine size by directly assigning to a child local value rather than an input variable. The appropriate design is to expose a typed input variable in the child and pass the engine size through the module block. Confirm whether the child receives the approved engine size through its public interface.
C:“Consumers obtain the endpoint without secret data exposure” would address a different Terraform configuration concern; the source instead describes A child module creates a managed SQL database but the root tries to set the engine size by directly assigning to a child local value rather than an input variable. The appropriate design is to expose a typed input variable in the child and pass the engine size through the module block. Confirm whether the child receives the approved engine size through its public interface.
Question 521
A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use the appropriate Registry or VCS module source syntax rather than a local file path.
- Convert environment-specific attributes to explicit inputs while retaining safe defaults only where appropriate.
- Declare a deliberate child output and read module.database.endpoint through the root module call.
- Prefer vetted sources and an internal private module registry with reviewed version governance.
Explanation
Correct Answer
C:The proposed intervention addresses the reported Terraform engineering failure: A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. It applies the design choice Declare a deliberate child output and read module.database.endpoint through the root module call. Review the primary diagnostic: Inspect child output block and intended exported value. The expected outcome is: The root consumes a supported module interface rather than internal addresses. The rollout safeguard is: Expose only necessary outputs and mark sensitive ones appropriately.
Incorrect Answers
A:“Use the appropriate Registry or VCS module source syntax rather than a local file path” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
B:“Convert environment-specific attributes to explicit inputs while retaining safe defaults only where appropriate” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
D:“Prefer vetted sources and an internal private module registry with reviewed version governance” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
Question 522
A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. 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 provider blocks inside the child and caller.
- Inspect resource tags and constants inside the child module.
- Check root expression references and the resulting plan output.
- Inspect child output block and intended exported value.
- Inspect the target module release's variable changes.
Explanation
Correct Answers
C:This is directly relevant evidence for the reported behavior: Check root expression references and the resulting plan output. 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 a deliberate child output and read module.database.endpoint through the root module call. The expected confirmation is The root consumes a supported module interface rather than internal addresses.
D:This is directly relevant evidence for the reported behavior: Inspect child output block and intended exported value. 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 a deliberate child output and read module.database.endpoint through the root module call. The expected confirmation is The root consumes a supported module interface rather than internal addresses.
Incorrect Answers
A:“Inspect provider blocks inside the child and caller” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
B:“Inspect resource tags and constants inside the child module” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
E:“Inspect the target module release's variable changes” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
Question 523
A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Mistaking child directories for independent state can create broad unintended plans.
- Cross-module resource reach-through is invalid and brittle.
- Copying module implementation fragments can create divergent security posture.
- Root modules cannot write arbitrary private child locals.
Explanation
Correct Answer
B:The reported condition creates the specific potential exposure: Cross-module resource reach-through is invalid and brittle. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect child output block and intended exported value. Second diagnostic: Check root expression references and the resulting plan output.
Incorrect Answers
A:“Mistaking child directories for independent state can create broad unintended plans” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
C:“Copying module implementation fragments can create divergent security posture” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
D:“Root modules cannot write arbitrary private child locals” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
Question 524
A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. 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 a deliberate child output and read module.database.endpoint through the root module call.
- Pass environment explicitly to every child module that declares it as an input.
- Pin a commit or tag and review the resulting plan.
- Expose only necessary outputs and mark sensitive ones appropriately.
- Document input defaults and enforce supported size constraints.
Explanation
Correct Answers
A:This is one of the two necessary decisions for a safe design: Declare a deliberate child output and read module.database.endpoint through the root module call. Together the corrective action and its implementation safeguard need to address the recorded condition: A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. Acceptance requires The root consumes a supported module interface rather than internal addresses.
D:This is one of the two necessary decisions for a safe design: Expose only necessary outputs and mark sensitive ones appropriately. Together the corrective action and its implementation safeguard need to address the recorded condition: A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. Acceptance requires The root consumes a supported module interface rather than internal addresses.
Incorrect Answers
B:“Pass environment explicitly to every child module that declares it as an input” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
C:“Pin a commit or tag and review the resulting plan” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
E:“Document input defaults and enforce supported size constraints” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
Question 525
A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. 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?
- Existing remote objects retain correct Terraform ownership under new module addresses.
- The root output selects the intended child instance endpoint.
- The root consumes a supported module interface rather than internal addresses.
- The local module resolves consistently on clean workstations and CI runners.
Explanation
Correct Answer
C:This is the appropriate measurable post-change acceptance criterion: The root consumes a supported module interface rather than internal addresses. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Expose only necessary outputs and mark sensitive ones appropriately.
Incorrect Answers
A:“Existing remote objects retain correct Terraform ownership under new module addresses” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
B:“The root output selects the intended child instance endpoint” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
D:“The local module resolves consistently on clean workstations and CI runners” would address a different Terraform configuration concern; the source instead describes A data platform wants the database endpoint from a child module, but attempts to reference the child's internal resource address directly from the root. The appropriate design is to declare a deliberate child output and read module.database.endpoint through the root module call. Confirm whether the root consumes a supported module interface rather than internal addresses.
Question 526
A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The infrastructure review requires a supported, least-disruptive Terraform solution. Which proposed change most directly addresses this specific situation?
- Use an indexed or collection expression matching the module instance addressing created by count.
- Pin a specific stable Git ref or tag in the module source and test the selected commit.
- Avoid exporting secrets unnecessarily and mark permitted outputs sensitive while protecting actual state.
- Map the appropriate provider alias in the module providers argument and declare expected child aliases.
Explanation
Correct Answer
D:The proposed intervention addresses the reported Terraform engineering failure: A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. It applies the design choice Map the appropriate provider alias in the module providers argument and declare expected child aliases. Review the primary diagnostic: Inspect the parent's provider configurations and module providers map. The expected outcome is: Child-managed resources use the intended account and region. The rollout safeguard is: Test alias propagation with region-specific disposable resources.
Incorrect Answers
A:“Use an indexed or collection expression matching the module instance addressing created by count” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
B:“Pin a specific stable Git ref or tag in the module source and test the selected commit” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
C:“Avoid exporting secrets unnecessarily and mark permitted outputs sensitive while protecting actual state” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
Question 527
A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. 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 the caller directory and target module path.
- Inspect the module source and currently selected version.
- Check the child's resource providers and plan target regions.
- Inspect the module source URL and ref query value.
- Inspect the parent's provider configurations and module providers map.
Explanation
Correct Answers
C:This is directly relevant evidence for the reported behavior: Check the child's resource providers and plan target regions. 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: Map the appropriate provider alias in the module providers argument and declare expected child aliases. The expected confirmation is Child-managed resources use the intended account and region.
E:This is directly relevant evidence for the reported behavior: Inspect the parent's provider configurations and module providers map. 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: Map the appropriate provider alias in the module providers argument and declare expected child aliases. The expected confirmation is Child-managed resources use the intended account and region.
Incorrect Answers
A:“Inspect the caller directory and target module path” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
B:“Inspect the module source and currently selected version” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
D:“Inspect the module source URL and ref query value” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
Question 528
A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. If this behavior continues without correction, which specific risk is most closely supported by the facts, without assuming harm has already occurred?
- Overly coupled modules make safe lifecycle management harder.
- Loose constraints can import breaking updates into production.
- Undeclared provider inheritance can target the wrong environment.
- Unreviewed third-party code can introduce unsafe infrastructure policies.
Explanation
Correct Answer
C:The reported condition creates the specific potential exposure: Undeclared provider inheritance can target the wrong environment. A risk is not evidence that every adverse outcome already occurred. Two independent checks can corroborate the assessment. First diagnostic: Inspect the parent's provider configurations and module providers map. Second diagnostic: Check the child's resource providers and plan target regions.
Incorrect Answers
A:“Overly coupled modules make safe lifecycle management harder” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
B:“Loose constraints can import breaking updates into production” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
D:“Unreviewed third-party code can introduce unsafe infrastructure policies” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
Question 529
A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. 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 intended versions and document compatible upgrade policy.
- Map the appropriate provider alias in the module providers argument and declare expected child aliases.
- Test alias propagation with region-specific disposable resources.
- Use an indexed or collection expression matching the module instance addressing created by count.
- Use a documented migration guide and gradual adoption.
Explanation
Correct Answers
B:This is one of the two necessary decisions for a safe design: Map the appropriate provider alias in the module providers argument and declare expected child aliases. Together the corrective action and its implementation safeguard need to address the recorded condition: A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. Acceptance requires Child-managed resources use the intended account and region.
C:This is one of the two necessary decisions for a safe design: Test alias propagation with region-specific disposable resources. Together the corrective action and its implementation safeguard need to address the recorded condition: A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. Acceptance requires Child-managed resources use the intended account and region.
Incorrect Answers
A:“Test intended versions and document compatible upgrade policy” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
D:“Use an indexed or collection expression matching the module instance addressing created by count” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region. For a governed implementation, the complementary validated step is to test alias propagation with region-specific disposable resources.
E:“Use a documented migration guide and gradual adoption” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
Question 530
A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. 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?
- Consumers obtain the endpoint without secret data exposure.
- Child-managed resources use the intended account and region.
- Each child receives an intentional environment input with no implicit name propagation.
- The local module resolves consistently on clean workstations and CI runners.
Explanation
Correct Answer
B:This is the appropriate measurable post-change acceptance criterion: Child-managed resources use the intended account and region. A successful Terraform command or a completed change request alone would not demonstrate that outcome. Preserve this control during validation: Test alias propagation with region-specific disposable resources.
Incorrect Answers
A:“Consumers obtain the endpoint without secret data exposure” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
C:“Each child receives an intentional environment input with no implicit name propagation” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.
D:“The local module resolves consistently on clean workstations and CI runners” would address a different Terraform configuration concern; the source instead describes A parent module uses one AWS alias for disaster recovery while a called module silently uses the default provider and puts instances in the wrong region. The appropriate design is to map the appropriate provider alias in the module providers argument and declare expected child aliases. Confirm whether child-managed resources use the intended account and region.