Practice Exams:

HashiCorp Terraform Associate 004 Dumps

EXAM: HashiCorp Certified: Terraform Associate (004)
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

Terraform Associate 004 Premium Bundle


  • Premium File 167 Questions & Answers
  • Training Course 118 Lectures
  • Study Guide 285 Pages

HashiCorp Terraform Associate 004 Practice Test 12

Question 110

An insurer deploys one monitoring resource in a shared services account and another in the application account without duplicating modules. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion. Verify: Compare .terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures.
  2. Implement: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. Verify: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  3. Implement: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Verify: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  4. Implement: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. Verify: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

Answer & Explanations

Correct answer: B

A.

This action/test pair addresses “Upgrade a selected provider deliberately using terraform init -upgrade”. Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion. Compare.terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures. The case instead calls for: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.

B.

The question is set in this situation: An insurer deploys one monitoring resource in a shared services account and another in the application account without duplicating modules. Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. Confirm it through this test: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object. Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context.

C.

The question is set in this situation: An insurer deploys one monitoring resource in a shared services account and another in the application account without duplicating modules. The test would be relevant: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object. But the offered implementation—Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.—addresses “Pass nondefault provider aliases explicitly into child modules”. The action needed here is: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.

D.

The question is set in this situation: An insurer deploys one monitoring resource in a shared services account and another in the application account without duplicating modules. The action is applicable: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. But its proposed test—Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.—addresses “Pass nondefault provider aliases explicitly into child modules”. This requirement is confirmed instead by: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.

Question 111

A security operations group reuses one network module across separate audit and application accounts and needs clear credential boundaries. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion.
  2. Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.
  3. Protect state snapshots, restrict backend access and enable appropriate encryption even when variables are marked sensitive in configuration.
  4. Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

Answer & Explanations

Correct answer: D

A.

Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion. This addresses “Upgrade a selected provider deliberately using terraform init -upgrade”, where the governing principle is: The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

B.

Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. This addresses “Select aliased provider configurations for a second region”, where the governing principle is: Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

C.

Protect state snapshots, restrict backend access and enable appropriate encryption even when variables are marked sensitive in configuration. This addresses “Understand that Terraform state can contain sensitive resource values”, where the governing principle is: Resource state may store secrets or other sensitive provider attributes; marking a value sensitive normally masks display rather than removing it from state. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

D.

Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration. Verify the result with this test: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

Question 112

A security operations group reuses one network module across separate audit and application accounts and needs clear credential boundaries. The infrastructure engineer proposes this change: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Which mechanism explains why it works?

  1. The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections.
  2. Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context.
  3. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.
  4. Resource state may store secrets or other sensitive provider attributes; marking a value sensitive normally masks display rather than removing it from state.

Answer & Explanations

Correct answer: C

A.

The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections. That explains “Upgrade a selected provider deliberately using terraform init -upgrade”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

B.

Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context. That explains “Select aliased provider configurations for a second region”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

C.

Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration. The corresponding implementation is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

D.

Resource state may store secrets or other sensitive provider attributes; marking a value sensitive normally masks display rather than removing it from state. That explains “Understand that Terraform state can contain sensitive resource values”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

Question 113

A security operations group reuses one network module across separate audit and application accounts and needs clear credential boundaries. After implementing this change—Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.—which test most directly validates its intended outcome?

  1. Compare .terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures.
  2. Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  3. Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.
  4. Create a nonsecret test state, inspect access controls, and verify that unauthorized readers cannot download or list state snapshots.

Answer & Explanations

Correct answer: C

A.

Compare.terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures. That would help test “Upgrade a selected provider deliberately using terraform init -upgrade”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

B.

Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object. That would help test “Select aliased provider configurations for a second region”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

C.

Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. This check is decisive because modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

D.

Create a nonsecret test state, inspect access controls, and verify that unauthorized readers cannot download or list state snapshots. That would help test “Understand that Terraform state can contain sensitive resource values”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

Question 114

A security operations group reuses one network module across separate audit and application accounts and needs clear credential boundaries. Which proposed shortcut most directly risks module resources deployed under a wrong provider configuration and should therefore be rejected?

  1. Commit a production state file to a public repository because variable values are marked sensitive in HCL.
  2. Change a version constraint in production and apply immediately without inspecting the selected provider binary or resulting plan changes.
  3. Declare a second provider alias but forget to associate the regional resource with it, assuming Terraform selects the nearest geographic region.
  4. Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

Answer & Explanations

Correct answer: D

A.

Commit a production state file to a public repository because variable values are marked sensitive in HCL. That shortcut risks credential or private infrastructure data exposure from uncontrolled state storage. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

B.

Change a version constraint in production and apply immediately without inspecting the selected provider binary or resulting plan changes. That shortcut risks unexpected destructive changes from unreviewed provider dependency upgrades. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

C.

Declare a second provider alias but forget to associate the regional resource with it, assuming Terraform selects the nearest geographic region. That shortcut risks creation of infrastructure in the wrong region or account. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

D.

Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances. The foreseeable failure is module resources deployed under a wrong provider configuration. The safer response is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

Question 115

A security operations group reuses one network module across separate audit and application accounts and needs clear credential boundaries. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Verify: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  2. Implement: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Verify: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.
  3. Implement: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. Verify: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.
  4. Implement: Protect state snapshots, restrict backend access and enable appropriate encryption even when variables are marked sensitive in configuration. Verify: Create a nonsecret test state, inspect access controls, and verify that unauthorized readers cannot download or list state snapshots.

Answer & Explanations

Correct answer: B

A.

The action is applicable: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. But its proposed test—Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.—addresses “Select aliased provider configurations for a second region”. This requirement is confirmed instead by: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

B.

Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Confirm it through this test: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

C.

The test would be relevant: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. But the offered implementation—Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.—addresses “Select aliased provider configurations for a second region”. The action needed here is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

D.

This action/test pair addresses “Understand that Terraform state can contain sensitive resource values”. Protect state snapshots, restrict backend access and enable appropriate encryption even when variables are marked sensitive in configuration. Create a nonsecret test state, inspect access controls, and verify that unauthorized readers cannot download or list state snapshots. The case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

Question 116

A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Which HashiCorp Terraform infrastructure implementation best satisfies this requirement?

  1. Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.
  2. Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion.
  3. Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.
  4. Use a compatible provider with documented resource schemas to translate Terraform configuration into authorized API operations for the target service.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration. Verify the result with this test: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

B.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Review provider version constraints, run terraform init -upgrade in an isolated branch, inspect the lock-file diff and re-run validation and plans before promotion. This addresses “Upgrade a selected provider deliberately using terraform init -upgrade”, where the governing principle is: The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

C.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. This addresses “Select aliased provider configurations for a second region”, where the governing principle is: Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

D.

Use a compatible provider with documented resource schemas to translate Terraform configuration into authorized API operations for the target service. This addresses “Understand provider plugins as the bridge to service APIs”, where the governing principle is: Terraform Core computes dependencies and manages plans while provider plugins implement resource read, create, update and delete behavior for remote APIs. The stated case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

Question 117

A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. The infrastructure engineer proposes this change: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Which mechanism explains why it works?

  1. Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context.
  2. The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections.
  3. Terraform Core computes dependencies and manages plans while provider plugins implement resource read, create, update and delete behavior for remote APIs.
  4. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

Answer & Explanations

Correct answer: D

A.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Terraform selects the default provider unless an explicit alias is passed; each aliased instance carries its own endpoints and credential context. That explains “Select aliased provider configurations for a second region”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

B.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. The upgrade option allows choosing newer provider versions that satisfy configured constraints; a normal locked initialization typically reuses existing selections. That explains “Upgrade a selected provider deliberately using terraform init -upgrade”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

C.

Terraform Core computes dependencies and manages plans while provider plugins implement resource read, create, update and delete behavior for remote APIs. That explains “Understand provider plugins as the bridge to service APIs”, not the mechanism behind the described change. The relevant principle is: Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

D.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration. The corresponding implementation is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

Question 118

A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. After implementing this change—Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.—which test most directly validates its intended outcome?

  1. Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.
  2. Inspect terraform providers and provider documentation, plan a test resource, and verify the appropriate remote API object is queried under the configured account.
  3. Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  4. Compare .terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures.

Answer & Explanations

Correct answer: A

A.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. This check is decisive because modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

B.

Inspect terraform providers and provider documentation, plan a test resource, and verify the appropriate remote API object is queried under the configured account. That would help test “Understand provider plugins as the bridge to service APIs”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

C.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object. That would help test “Select aliased provider configurations for a second region”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

D.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Compare.terraform.lock.hcl before and after a controlled upgrade in staging and ensure the plan has no unintended replacements or schema failures. That would help test “Upgrade a selected provider deliberately using terraform init -upgrade”, not the outcome required in this scenario. The relevant acceptance check is: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

Question 119

A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Which proposed shortcut most directly risks module resources deployed under a wrong provider configuration and should therefore be rejected?

  1. Declare a second provider alias but forget to associate the regional resource with it, assuming Terraform selects the nearest geographic region.
  2. Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.
  3. Change a version constraint in production and apply immediately without inspecting the selected provider binary or resulting plan changes.
  4. Assume Terraform Core itself knows every third-party API argument and can create arbitrary resources without a provider plugin.

Answer & Explanations

Correct answer: B

A.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Declare a second provider alias but forget to associate the regional resource with it, assuming Terraform selects the nearest geographic region. That shortcut risks creation of infrastructure in the wrong region or account. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

B.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances. The foreseeable failure is module resources deployed under a wrong provider configuration. The safer response is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

C.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Change a version constraint in production and apply immediately without inspecting the selected provider binary or resulting plan changes. That shortcut risks unexpected destructive changes from unreviewed provider dependency upgrades. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

D.

Assume Terraform Core itself knows every third-party API argument and can create arbitrary resources without a provider plugin. That shortcut risks unknown resource type errors or unintended infrastructure assumptions from missing provider schemas. Here the specific shortcut is: Assume any child module automatically receives every caller provider alias, without declaring or mapping those provider instances.

Question 120

A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Which combined implementation and verification plan is the best match for this workload?

  1. Implement: Use a compatible provider with documented resource schemas to translate Terraform configuration into authorized API operations for the target service. Verify: Inspect terraform providers and provider documentation, plan a test resource, and verify the appropriate remote API object is queried under the configured account.
  2. Implement: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Verify: Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.
  3. Implement: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Verify: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.
  4. Implement: Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account. Verify: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

Answer & Explanations

Correct answer: C

A.

This action/test pair addresses “Understand provider plugins as the bridge to service APIs”. Use a compatible provider with documented resource schemas to translate Terraform configuration into authorized API operations for the target service. Inspect terraform providers and provider documentation, plan a test resource, and verify the appropriate remote API object is queried under the configured account. The case instead calls for: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

B.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. The action is applicable: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. But its proposed test—Plan two disposable resources with distinct provider aliases and verify the expected region and account are recorded for each object.—addresses “Select aliased provider configurations for a second region”. This requirement is confirmed instead by: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets.

C.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module. Confirm it through this test: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. Modules can inherit default providers but nondefault configurations must be passed deliberately; otherwise resources may resolve to an unintended default or lack configuration.

D.

The question is set in this situation: A research institute calls a shared module that creates resources in two approved regions and must avoid default-provider leakage. The test would be relevant: Run terraform validate and a sandbox plan with a module using two aliases and inspect which account each module-managed resource targets. But the offered implementation—Declare separate provider blocks with an alias and use the resource provider meta-argument to bind individual resources to the intended region or account.—addresses “Select aliased provider configurations for a second region”. The action needed here is: Configure required provider aliases in a child module's configuration_aliases when necessary and pass explicit provider mappings from the calling module.

HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests