100% Latest & Updated HashiCorp Terraform Associate 004 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 70
A Terraform platform team is coordinating 3 independent decisions. Workstream A: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. and Workstream B: An application team must create one DNS record per hostname from a stable set of known domain names. and Workstream C: A Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution. Select exactly 3 actions, one addressing each distinct workstream.
- Use for_each over a suitable set or map to create stable keyed resource instances.
- Specify a reviewed registry-module version constraint in the module block.
- Declare configuration_aliases in the child and pass the intended configurations through module.providers.
- Use terraform show -json on the state or saved plan with proper access controls.
- Use terraform state show ADDRESS or a carefully scoped terraform show output on the selected state.
- Select the appropriate HCP Terraform cloud integration and remove the conflicting backend declaration.
Explanation
Correct Answers
A:For the workstream in which an application team must create one DNS record per hostname from a stable set of known domain names, use this action: Use for_each over a suitable set or map to create stable keyed resource instances. for_each is useful when each instance has a stable logical key. Verify: A change to one hostname affects its keyed address instead of renumbering unrelated instances. Limitation: Removing or renaming a key can still destroy or replace that keyed resource instance.
C:For the workstream in which a child network module expects two AWS provider aliases, but the root module has only passed its default provider, use this action: Declare configuration_aliases in the child and pass the intended configurations through module.providers. Provider maps and alias declarations make cross-module provider association explicit. Verify: The child resource plans with the specifically mapped source and destination provider aliases. Limitation: Aliased provider instances are not inherited automatically by a child module.
F:For the workstream in which a Terraform configuration contains both a cloud block and a backend block while planning to use HCP Terraform remote execution, use this action: Select the appropriate HCP Terraform cloud integration and remove the conflicting backend declaration. HCP Terraform cloud integration and an explicit backend block are mutually exclusive in one root configuration. Verify: Initialization uses the configured HCP organization and workspace association without a second backend block. Limitation: Migrating existing state to cloud-managed workspaces needs a controlled review and backup.
Incorrect Answers
B:This action is appropriate instead for a different, unlisted requirement: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. It would be checked by: Initialization selects a module release satisfying the stated registry version requirement. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
D:This action is appropriate instead for a different, unlisted requirement: An engineer wants a machine-readable view of the current Terraform state while building an inventory report. It would be checked by: The JSON structure can be parsed for relevant addresses and outputs by authorized tooling. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
E:This action is appropriate instead for a different, unlisted requirement: An analyst needs to inspect one managed resource's recorded attributes and associated provider metadata during an incident. It would be checked by: The selected resource's stored attributes and address are visible for diagnosis. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
Question 71
An infrastructure team faces this specific situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. Which Terraform action most directly satisfies the requirement?
- Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations.
- Import the existing bucket into an appropriate resource address after writing matching configuration.
- Pass a different root provider configuration into each module call through its providers map.
- Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls.
Explanation
Correct Answer
C:Pass a different root provider configuration into each module call through its providers map. Provider instances are configured at the root and passed to module instances as needed. Verify: Each module instance is associated with the correct account provider during plan. Limitation: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
Incorrect Answers
A:This is linked to a different situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. There the relevant decision is: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant decision is: Pass a different root provider configuration into each module call through its providers map. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. There the relevant decision is: Import the existing bucket into an appropriate resource address after writing matching configuration. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant decision is: Pass a different root provider configuration into each module call through its providers map. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. There the relevant decision is: Distinguish provider-version lock metadata from terraform.tfstate and protect the actual state through suitable backend controls. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant decision is: Pass a different root provider configuration into each module call through its providers map. It would therefore not resolve or assess the case as stated.
Question 72
A reviewer is confirming a change for the following use case: A security team calls the same reusable child module twice, once under each of two cloud accounts. The implementation follows this approach: Pass a different root provider configuration into each module call through its providers map. Which observation or acceptance test most directly verifies the intended result?
- Each module instance is associated with the correct account provider during plan.
- A plan shows the bound object as no longer desired when its resource address disappears from configuration.
- The state lists the imported address, and a subsequent plan can be evaluated for unintended differences.
- The lock entry identifies the intended registry namespace, provider type, and selected version.
Explanation
Correct Answer
A:Acceptance evidence: Each module instance is associated with the correct account provider during plan. It validates the proposed action, pass a different root provider configuration into each module call through its providers map, because provider instances are configured at the root and passed to module instances as needed. Remaining limitation: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
Incorrect Answers
B:This is linked to a different situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. There the relevant acceptance is: A plan shows the bound object as no longer desired when its resource address disappears from configuration. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant acceptance is: Each module instance is associated with the correct account provider during plan. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. There the relevant acceptance is: The state lists the imported address, and a subsequent plan can be evaluated for unintended differences. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant acceptance is: Each module instance is associated with the correct account provider during plan. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A service module declares use of a third-party provider but two different namespaces publish plugins with the same local name. There the relevant acceptance is: The lock entry identifies the intended registry namespace, provider type, and selected version. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant acceptance is: Each module instance is associated with the correct account provider during plan. It would therefore not resolve or assess the case as stated.
Question 73
Consider a proposed solution for this requirement: A security team calls the same reusable child module twice, once under each of two cloud accounts. The team plans to do the following: Pass a different root provider configuration into each module call through its providers map. Which limitation or operational caveat must remain in the review?
- Alias names are Terraform-local configuration references, not separate plugin versions.
- Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights.
- Upgrading may change provider behavior, so review plans and release notes before applying.
- Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
Explanation
Correct Answer
D:The limitation is do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. The proposed change is pass a different root provider configuration into each module call through its providers map. Validate it by checking each module instance is associated with the correct account provider during plan. Provider instances are configured at the root and passed to module instances as needed.
Incorrect Answers
A:This is linked to a different situation: A configuration has two aliases of the same cloud provider and both use different regions; one resource must be created outside the default region. There the relevant limitation is: Alias names are Terraform-local configuration references, not separate plugin versions. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: An engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself. There the relevant limitation is: Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. There the relevant limitation is: Upgrading may change provider behavior, so review plans and release notes before applying. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. It would therefore not resolve or assess the case as stated.
Question 74
The team is reviewing a Terraform implementation for this case: A security team calls the same reusable child module twice, once under each of two cloud accounts. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Assume module input variables alone can redirect all provider API calls without a provider mapping.
- Write static credentials into a versioned provider block because Terraform marks all input strings secret.
- Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed.
- Treat provider dependency checksums as the definitive list of deployed infrastructure resources.
Explanation
Correct Answer
A:Reject the assumption: Assume module input variables alone can redirect all provider API calls without a provider mapping. Instead, pass a different root provider configuration into each module call through its providers map. Provider instances are configured at the root and passed to module instances as needed. Acceptance evidence: Each module instance is associated with the correct account provider during plan.
Incorrect Answers
B:This is linked to a different situation: A newly introduced provider plugin needs credentials but the team wants to avoid including long-lived secrets in tracked files. There the relevant misconception is: Write static credentials into a versioned provider block because Terraform marks all input strings secret. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant misconception is: Assume module input variables alone can redirect all provider API calls without a provider mapping. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A storage bucket exists in the cloud, but Terraform proposes creating another bucket with the intended name because its state has no binding. There the relevant misconception is: Edit a JSON state file by hand as the normal way to make an unmanaged bucket Terraform-managed. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant misconception is: Assume module input variables alone can redirect all provider API calls without a provider mapping. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team considers keeping .terraform.lock.hcl in a secrets vault because it thinks the file is the primary infrastructure state store. There the relevant misconception is: Treat provider dependency checksums as the definitive list of deployed infrastructure resources. For the question's actual requirement — A security team calls the same reusable child module twice, once under each of two cloud accounts. — the specifically relevant misconception is: Assume module input variables alone can redirect all provider API calls without a provider mapping. It would therefore not resolve or assess the case as stated.
Question 75
A Terraform platform team is coordinating 2 independent decisions. Workstream A: A security team calls the same reusable child module twice, once under each of two cloud accounts. and Workstream B: A security group requires multiple repeated ingress blocks derived from a variable collection, and copy-pasting blocks is error-prone. Select exactly 2 actions, one addressing each distinct workstream.
- Use for_each on the module block and reference module.stack["test"].endpoint.
- Pass a different root provider configuration into each module call through its providers map.
- Ignore .terraform and protect state while committing the intended HCL and provider dependency lock file.
- Use terraform init -migrate-state when intending to copy existing state to the new backend.
- Use a dynamic nested block for the repeatable ingress structure when the provider schema allows it.
Explanation
Correct Answers
B:For the workstream in which a security team calls the same reusable child module twice, once under each of two cloud accounts, use this action: Pass a different root provider configuration into each module call through its providers map. Provider instances are configured at the root and passed to module instances as needed. Verify: Each module instance is associated with the correct account provider during plan. Limitation: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
E:For the workstream in which a security group requires multiple repeated ingress blocks derived from a variable collection, and copy-pasting blocks is error-prone, use this action: Use a dynamic nested block for the repeatable ingress structure when the provider schema allows it. Dynamic blocks construct repeatable nested provider-defined configuration blocks. Verify: Each input rule produces a corresponding nested ingress block in the planned resource. Limitation: dynamic can generate normal nested blocks, not arbitrary provider meta-arguments or resource blocks.
Incorrect Answers
A:This option addresses a separate requirement: A module is instantiated for each environment in a map, and the root needs the output for the test environment. Evidence for that other requirement would be the keyed module instance exposes only the test environment's selected output; neither listed workstream asks for it.
C:This option addresses a separate requirement: An engineer wants to commit the local .terraform directory to source control because it contains provider caches and backend settings. Evidence for that other requirement would be the repository contains reviewed configuration and .terraform.lock.hcl, not transient cache or backend secrets; neither listed workstream asks for it.
D:This option addresses a separate requirement: A backend location was changed in configuration, but Terraform still recognizes the prior backend and asks how to proceed. Evidence for that other requirement would be the new backend holds the migrated state and a subsequent state list shows expected addresses; neither listed workstream asks for it.
Question 76
An infrastructure team faces this specific situation: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. Which Terraform action most directly satisfies the requirement?
- Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module.
- Declare configuration_aliases in the child and pass the intended configurations through module.providers.
- Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations.
- Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible.
Explanation
Correct Answer
C:Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. State allows Terraform to map declared resource instances to existing real objects and reason about changes. Verify: A plan shows the bound object as no longer desired when its resource address disappears from configuration. Limitation: A state binding records managed identity; it is not itself a backup of the remote service.
Incorrect Answers
A:This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant decision is: Declare separate supported Kubernetes and DNS providers and use their respective resource types in the same root module. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant decision is: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. There the relevant decision is: Declare configuration_aliases in the child and pass the intended configurations through module.providers. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant decision is: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant decision is: Commit .terraform.lock.hcl and use required_providers version constraints to keep provider selection reproducible. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant decision is: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. It would therefore not resolve or assess the case as stated.
Question 77
A reviewer is confirming a change for the following use case: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. The implementation follows this approach: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. Which observation or acceptance test most directly verifies the intended result?
- The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums.
- The child resource plans with the specifically mapped source and destination provider aliases.
- A plan shows the bound object as no longer desired when its resource address disappears from configuration.
- The plan identifies primary and recovery resources using the intended regional provider instances.
Explanation
Correct Answer
C:Acceptance evidence: A plan shows the bound object as no longer desired when its resource address disappears from configuration. It validates the proposed action, explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations, because state allows Terraform to map declared resource instances to existing real objects and reason about changes. Remaining limitation: A state binding records managed identity; it is not itself a backup of the remote service.
Incorrect Answers
A:This is linked to a different situation: A project intentionally needs a newer provider version allowed by its constraints, but init keeps reusing the version recorded in the lock file. There the relevant acceptance is: The updated .terraform.lock.hcl records the newly selected compatible provider and its checksums. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant acceptance is: A plan shows the bound object as no longer desired when its resource address disappears from configuration. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. There the relevant acceptance is: The child resource plans with the specifically mapped source and destination provider aliases. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant acceptance is: A plan shows the bound object as no longer desired when its resource address disappears from configuration. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: An infrastructure release creates AWS resources in two regions, with a disaster-recovery instance explicitly assigned to the second region. There the relevant acceptance is: The plan identifies primary and recovery resources using the intended regional provider instances. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant acceptance is: A plan shows the bound object as no longer desired when its resource address disappears from configuration. It would therefore not resolve or assess the case as stated.
Question 78
Consider a proposed solution for this requirement: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. The team plans to do the following: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. Which limitation or operational caveat must remain in the review?
- A state binding records managed identity; it is not itself a backup of the remote service.
- Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping.
- Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights.
- The dependency lock file locks provider selections, not an immutable Terraform CLI binary version.
Explanation
Correct Answer
A:The limitation is a state binding records managed identity; it is not itself a backup of the remote service. The proposed change is explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. Validate it by checking a plan shows the bound object as no longer desired when its resource address disappears from configuration. State allows Terraform to map declared resource instances to existing real objects and reason about changes.
Incorrect Answers
B:This is linked to a different situation: A security team calls the same reusable child module twice, once under each of two cloud accounts. There the relevant limitation is: Do not put shared provider configuration blocks inside a modern reusable child module to solve this mapping. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant limitation is: A state binding records managed identity; it is not itself a backup of the remote service. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: An engineer thinks the provider block installs the AWS provider and a resource block selects the AWS account by itself. There the relevant limitation is: Provider settings do not guarantee permission to create any resource without valid credentials and IAM rights. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant limitation is: A state binding records managed identity; it is not itself a backup of the remote service. It would therefore not resolve or assess the case as stated.
D:This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant limitation is: The dependency lock file locks provider selections, not an immutable Terraform CLI binary version. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant limitation is: A state binding records managed identity; it is not itself a backup of the remote service. It would therefore not resolve or assess the case as stated.
Question 79
The team is reviewing a Terraform implementation for this case: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. Which tempting assumption would be specifically incorrect for this proposed implementation?
- Treat a single Kubernetes provider as a universal interface to every cloud DNS service.
- Assume required_providers constraints alone always choose the identical provider build for every run.
- Assume the child automatically inherits all aliases merely because it inherits an unaliased provider.
- Assume removing a resource block is a harmless change to documentation with no planned infrastructure effect.
Explanation
Correct Answer
D:Reject the assumption: Assume removing a resource block is a harmless change to documentation with no planned infrastructure effect. Instead, explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. State allows Terraform to map declared resource instances to existing real objects and reason about changes. Acceptance evidence: A plan shows the bound object as no longer desired when its resource address disappears from configuration.
Incorrect Answers
A:This is linked to a different situation: A newly created project uses both a Kubernetes cluster and cloud DNS records, and the same release should manage them coherently. There the relevant misconception is: Treat a single Kubernetes provider as a universal interface to every cloud DNS service. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant misconception is: Assume removing a resource block is a harmless change to documentation with no planned infrastructure effect. It would therefore not resolve or assess the case as stated.
B:This is linked to a different situation: A team pins the AWS provider below 6.0 but a new contractor runs init and unexpectedly resolves a higher patch than other developers. There the relevant misconception is: Assume required_providers constraints alone always choose the identical provider build for every run. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant misconception is: Assume removing a resource block is a harmless change to documentation with no planned infrastructure effect. It would therefore not resolve or assess the case as stated.
C:This is linked to a different situation: A child network module expects two AWS provider aliases, but the root module has only passed its default provider. There the relevant misconception is: Assume the child automatically inherits all aliases merely because it inherits an unaliased provider. For the question's actual requirement — An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. — the specifically relevant misconception is: Assume removing a resource block is a harmless change to documentation with no planned infrastructure effect. It would therefore not resolve or assess the case as stated.
Question 80
A Terraform platform team is coordinating 3 independent decisions. Workstream A: An operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction. and Workstream B: A deployment needs to choose a service hostname based on whether the environment is production. and Workstream C: An operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed. Select exactly 3 actions, one addressing each distinct workstream.
- Use a Terraform root module that explicitly declares tracked resources and reconcile it through Terraform state.
- Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration.
- Use a conditional expression over a declared environment variable to select the appropriate hostname.
- Select suitable Azure and monitoring providers and declare both systems through one Terraform root module.
- Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations.
- Specify a reviewed registry-module version constraint in the module block.
Explanation
Correct Answers
B:For the workstream in which an operations team edits cloud VM tags manually, and normal Terraform plan shows an unexpected change even though HCL has not changed, use this action: Interpret the refreshed plan as detected drift and decide whether to restore declared tags or intentionally update configuration. Refreshing known remote objects exposes differences between actual and declared desired state. Verify: The reviewed plan explains which observed remote attributes differ from desired HCL. Limitation: Not every remote change is actionable drift; provider-computed attributes and intentional shared ownership need consideration.
C:For the workstream in which a deployment needs to choose a service hostname based on whether the environment is production, use this action: Use a conditional expression over a declared environment variable to select the appropriate hostname. Conditional expressions select one of two typed values based on a boolean condition. Verify: The plan selects the production hostname only when the condition evaluates true. Limitation: Both branches need compatible types and the condition must be a boolean expression.
E:For the workstream in which an operator asks why deleting one resource stanza from a configuration can cause a production object to be proposed for destruction, use this action: Explain that Terraform compares current configuration with state bindings and plans to reconcile deleted declarations. State allows Terraform to map declared resource instances to existing real objects and reason about changes. Verify: A plan shows the bound object as no longer desired when its resource address disappears from configuration. Limitation: A state binding records managed identity; it is not itself a backup of the remote service.
Incorrect Answers
A:This action is appropriate instead for a different, unlisted requirement: An audit team asks whether applying a YAML-looking file automatically turns ad hoc server purchases into managed infrastructure. It would be checked by: The plan and state distinguish managed resource instances from unmanaged manual purchases. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
D:This action is appropriate instead for a different, unlisted requirement: A company uses Azure for application workloads and a SaaS provider for monitoring, and wants to avoid managing two separate IaC languages. It would be checked by: Plan output contains the cloud deployment and monitoring integrations with clear provider ownership. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
F:This action is appropriate instead for a different, unlisted requirement: A team uses a module from the public registry and needs to prevent unreviewed minor changes after a security assessment. It would be checked by: Initialization selects a module release satisfying the stated registry version requirement. None of the 3 specified workstreams calls for this action; their correct choices directly solve the identified cases.
HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests