You save $69.98
Terraform Associate 004 Premium Bundle
- Premium File 167 Questions & Answers
- Last Update: Nov 15, 2026
- Training Course 118 Lectures
- Study Guide 285 Pages
You save $69.98
A change proposal says: A resource needs replacement when a referenced certificate resource changes. The selected solution is "Use lifecycle { replace_triggered_by = [aws_acm_certificate.example] } or appropriate referenced resource". Which statement most accurately explains the solution?
Replace-triggered-by ties replacement to changes of managed resource references. This is the underlying rule explaining why the proposed response addresses the described situation.
Terraform normally builds resource ordering from references without needing redundant explicit dependencies. This explains the different case "A deployment has a direct attribute reference from an instance to a subnet".
Lifecycle processing occurs early and requires literal rule values rather than arbitrary computed expressions. This explains the different case "A team tries to choose prevent_destroy dynamically using var.protection".
Depends-on affects operation sequencing but does not supply an output value or compute an argument. This explains the different case "A reviewer wants to know whether depends_on makes a resource update its own arguments".
The team observes: An engineer wants to read a short-lived secret at run time from HashiCorp Vault. It selects this response: Use an appropriate Vault integration with least privilege and ephemeral handling where supported. Which explanation best supports that choice?
Vault can deliver scoped secrets dynamically, but ordinary Terraform data paths may still persist them without safe constructs. This is the underlying rule explaining why the proposed response addresses the described situation.
A sensitive annotation does not make plaintext secrets in repository history secure. This explains the different case "A team commits a real API token as the default of an input variable".
Write-only values are not retained for diffing, so companion version fields can signal intentional updates. This explains the different case "A resource uses a supported password_wo argument but Terraform cannot detect password rotation from state".
A sensitive output flag reduces routine display exposure but does not remove the underlying value from state. This explains the different case "An engineer wants to output an access token and hide it in terminal output".
A platform engineer encounters this condition: An architect asks how Terraform can use cloud API credentials without the credentials appearing in resource definitions. What is the best next step?
Configure provider authentication through supported environment or workload identity mechanisms. Provider configuration mediates authenticated API calls without requiring secrets in every resource block. This is the directly relevant answer for the reported condition.
Reference the load balancer output attribute in the DNS resource. This would address a different situation: An application depends on a DNS record after its cloud load balancer has an address.
Configure the GitHub and Kubernetes providers and required resources. This would address a different situation: A company needs to configure a GitHub repository and Kubernetes service in one deployment.
Use separate supported providers within a common Terraform configuration where appropriate. This would address a different situation: A hybrid estate uses public-cloud instances and VMware virtual machines.
In a Terraform Associate 004 case, An organization wants Terraform to adopt an existing bucket instead of creating a duplicate. An engineer chooses: Define the bucket as a managed resource and use an import workflow. What mechanism makes this effective?
A managed resource must be bound to the existing remote object before Terraform can manage its lifecycle. This is the underlying rule explaining why the proposed response addresses the described situation.
Data sources read provider information without claiming the remote object's create and destroy lifecycle. This explains the different case "A module needs the ID of an existing subnet owned by a different Terraform project".
Reading a data source does not provision the referenced object. This explains the different case "An author declares data "aws_vpc" "selected" and expects applying it to create a VPC".
Data source evaluation can occur at apply time when input values are not known during planning. This explains the different case "A data source reads a value during plan but its arguments depend on a resource created in the same apply".
A project uses the approach "Prefer a planned configuration change and treat targeting as an exceptional recovery tool" after discovering: An operator wants to delete only one selected resource using terraform destroy -target casually. Which underlying Terraform behavior explains it?
Targeting can omit dependent changes and is not recommended for routine infrastructure lifecycle management. This is the underlying rule explaining why the proposed response addresses the described situation.
Destroy targets resources bound to the currently selected state, not an abstract project name. This explains the different case "A team runs terraform destroy in the wrong workspace".
A data source does not manage creation or deletion of the looked-up remote object. This explains the different case "A plan proposes deleting a data source when its block is removed".
Destroy uses the managed resource graph to delete tracked infrastructure. This explains the different case "A project has been decommissioned and all Terraform-managed objects must be removed".
Consider this Terraform 1.12 operating situation: A downstream resource needs the ID of the third item created with count. Which proposed change is correct?
Use the indexed address such as aws_instance.worker[2].id. Count-based resources are addressed by numeric indices beginning at zero. This is the directly relevant answer for the reported condition.
Inspect the expression links between resources and any explicit dependencies. This would address a different situation: An engineer wants to understand why a reference exists in the plan dependency graph.
Use the subnet resource's exported ID rather than a copied literal. This would address a different situation: A developer hard-codes a freshly created subnet ID even though Terraform creates the subnet too.
Distinguish addresses using module paths such as module.alpha.random_id.name. This would address a different situation: Two modules both contain a resource "random_id" "name" block.
An infrastructure-as-code change request states: A Terraform module has two instances of the same resource type named front and back. What should the operator do?
Reference each instance with its full type and local name address. Terraform addresses distinguish resource blocks by type and name within their module. This is the directly relevant answer for the reported condition.
Reference aws_security_group.app.id in the compute resource's argument. This would address a different situation: A compute resource must attach to a managed network security group created in the same root module.
Inspect the expression links between resources and any explicit dependencies. This would address a different situation: An engineer wants to understand why a reference exists in the plan dependency graph.
Add a child output for the address and consume module.child.endpoint. This would address a different situation: A parent module needs the endpoint address created inside a child module.
An infrastructure engineer justifies this correction: Use the module call's providers mapping to bind the alternate provider. For the reported condition "An application module requires a provider alias for another AWS region", which explanation is right?
Provider configuration mapping supplies a module with the correct caller-managed API connection. This is the underlying rule explaining why the proposed response addresses the described situation.
Repeating module calls produces multiple addressed module instances. This explains the different case "An author uses a module output from a for_each module as though it were a singleton".
Reusable child modules should avoid hard-coding caller secrets and region assumptions. This explains the different case "A reusable module defines region-specific provider credentials internally".
A reusable module groups related resources behind one logical interface. This explains the different case "A company repeatedly declares the same subnet and routing pattern".
An engineer is troubleshooting this Terraform workflow: A resource and a data source use similar type names but different configurations. What should happen next?
Use the provider documentation to distinguish managed resource schemas from read-only data schemas. Providers may expose both managed and lookup types with different arguments and results. This is the directly relevant answer for the reported condition.
Declare a provider-supported resource block for the network. This would address a different situation: A team needs Terraform to create and maintain a new virtual network.
Read it via a supported image data source and reference the result from server resources. This would address a different situation: A developer wants to use a remote image identifier as a read-only input for new servers.
Confirm the lookup is not a managed resource and review the plan. This would address a different situation: A team removes a data block and fears Terraform will delete its production DNS zone.
A colleague asks how to handle this case: A deployer says terraform plan creates a resource if the plan is green. Which response is the safest appropriate one?
Clarify that a plan only previews intended operations and requires a later apply. Planning does not by itself provision infrastructure through provider create operations. This is the directly relevant answer for the reported condition.
Recognize it as a computed attribute not yet available during planning. This would address a different situation: A resource attribute says (known after apply) in the preview.
Investigate remote drift, refreshed state, or changed external data-source values. This would address a different situation: A plan unexpectedly proposes changes even though no HCL files changed.
Run terraform plan -detailed-exitcode and interpret 0 no changes, 2 changes, 1 error. This would address a different situation: A reviewer wants a quick exit code indicating whether a plan contains changes.
The platform currently has this problem: A team wants a local child module rather than a duplicated copy of its HCL. Which Terraform/HCP Terraform action addresses it?
Create a child directory with module configuration and reference that directory as source. Modules package collections of resource declarations and their input/output interfaces for reuse. This is the directly relevant answer for the reported condition.
Use local paths, supported version-control URLs, or private registry sources as appropriate. This would address a different situation: A customer asks whether all modules must be hosted in HashiCorp's public registry.
Use the registry module source address including its namespace, name, and provider. This would address a different situation: A team wants a published networking module from the Terraform public registry.
Use a maintained reachable source and pin an approved release artifact. This would address a different situation: A module source points to an external archive that is no longer available.
Please check your mailbox for a message from support@examlabs.com and follow the directions.