HashiCorp Terraform Associate 004 Practice Test 24
Question 230
While diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: Terraform init fails sporadically with a provider connectivity error, but its normal CLI output lacks sufficient context for investigating the failed request. The investigator must avoid unreviewed state writes. Select TWO: the decisive first check and the change that directly addresses the problem.
- Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state.
- Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command.
- Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data.
- Set TF_LOG to the intended log level together with TF_LOG_PATH and rerun the failing Terraform command.
- Inspect the resource's provider selection, active credentials and which account owns the remote object.
Explanation
Correct Answers
B:Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command. Terraform logging through TF_LOG adds CLI/provider diagnostics; verbose traces may include sensitive operational information. Confirm the cause with: Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data. A concrete acceptance test is: The logs identify the failing initialization or provider interaction and can be disabled after troubleshooting. This forms one element of the required two-step diagnosis and correction. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: Terraform….
C:Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data. Terraform logging through TF_LOG adds CLI/provider diagnostics; verbose traces may include sensitive operational information. A justified correction is: Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command. This forms one element of the required two-step diagnosis and correction. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: Terraform….
Incorrect Answers
A:Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state. This relates to import blocks for reproducible adoption workflow rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data. Then change: Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command.
D:Set TF_LOG to the intended log level together with TF_LOG_PATH and rerun the failing Terraform command. This relates to tf_log_path requires enabled logging rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data. Then change: Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: Terraform….
E:Inspect the resource's provider selection, active credentials and which account owns the remote object. This relates to import source account and provider selection rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the failure mode and select an appropriate TF_LOG verbosity level while protecting credential-bearing log data. Then change: Temporarily set TF_LOG to a useful level such as DEBUG or TRACE and capture restricted diagnostic output for the failing command.
Question 231
During a controlled module integration test for a production Terraform stack, the following condition occurs: An external record lookup runs during planning even though the underlying managed resource is not ready and the data source returns no matching object. The desired fix must avoid unrelated resource changes. Which Terraform configuration or workflow change most directly corrects the described issue?
- Express the necessary dependency explicitly or reference a resource attribute so the lookup can occur when its prerequisite exists.
- Reference the correct keyed resource instance or use a reviewed moved block to preserve its existing state identity during refactoring.
- Use a resource precondition or postcondition for a hard lifecycle invariant and reserve check blocks for non-blocking validation reports.
- Use the managed subnet resource's appropriate output attribute directly in the server configuration.
Explanation
Correct Answer
A:Express the necessary dependency explicitly or reference a resource attribute so the lookup can occur when its prerequisite exists. Data reads may happen during planning unless their prerequisites require deferral; dependency structure matters for lookup timing. Confirm the cause with: Inspect the graph references and whether the data source must wait for a managed resource's creation. A concrete acceptance test is: The plan defers the lookup when needed and avoids failing on a remote object that is not yet created. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: An….
Incorrect Answers
B:Reference the correct keyed resource instance or use a reviewed moved block to preserve its existing state identity during refactoring. This could address resource addressing with repeated instances, but it does not correct the indicated data source read ordering versus creation mechanism. The relevant fix is: Express the necessary dependency explicitly or reference a resource attribute so the lookup can occur when its prerequisite exists. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: An….
C:Use a resource precondition or postcondition for a hard lifecycle invariant and reserve check blocks for non-blocking validation reports. This could address check block observability versus hard failure, but it does not correct the indicated data source read ordering versus creation mechanism. The relevant fix is: Express the necessary dependency explicitly or reference a resource attribute so the lookup can occur when its prerequisite exists.
D:Use the managed subnet resource's appropriate output attribute directly in the server configuration. This could address implicit dependency through resource attribute reference, but it does not correct the indicated data source read ordering versus creation mechanism. The relevant fix is: Express the necessary dependency explicitly or reference a resource attribute so the lookup can occur when its prerequisite exists.
Question 232
While diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An operator sets TF_LOG_PATH to an output file but receives no detailed diagnostics because Terraform logging was never enabled. The investigator must avoid unreviewed state writes. What acceptance evidence best establishes that the Terraform issue has been resolved?
- The reviewer sees the requested resource's stored values while no import, state edit or remote mutation is performed.
- The logs identify the failing initialization or provider interaction and can be disabled after troubleshooting.
- The resource binds to the production object while no unexpected development object is created or modified.
- The target restricted log file contains troubleshooting detail without leaving verbose tracing enabled for normal builds.
Explanation
Correct Answer
D:The target restricted log file contains troubleshooting detail without leaving verbose tracing enabled for normal builds. TF_LOG_PATH selects a log destination but must be paired with an enabled TF_LOG level to produce verbose logs. It tests the correction: Set TF_LOG to the intended log level together with TF_LOG_PATH and rerun the failing Terraform command. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
Incorrect Answers
A:The reviewer sees the requested resource's stored values while no import, state edit or remote mutation is performed. This might validate state show inspects one stored resource instance, but it does not prove that tf_log_path requires enabled logging was resolved. Confirm instead: The target restricted log file contains troubleshooting detail without leaving verbose tracing enabled for normal builds.
B:The logs identify the failing initialization or provider interaction and can be disabled after troubleshooting. This might validate tf_log for troubleshooting provider and cli diagnostics, but it does not prove that tf_log_path requires enabled logging was resolved. Confirm instead: The target restricted log file contains troubleshooting detail without leaving verbose tracing enabled for normal builds. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
C:The resource binds to the production object while no unexpected development object is created or modified. This might validate import source account and provider selection, but it does not prove that tf_log_path requires enabled logging was resolved. Confirm instead: The target restricted log file contains troubleshooting detail without leaving verbose tracing enabled for normal builds. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
Question 233
While diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An organization adopts hundreds of existing resources using ad hoc CLI import commands that are absent from code review and difficult to reproduce. The investigator must avoid unreviewed state writes. Which TWO options together provide the relevant diagnosis and its targeted remediation? Select TWO.
- Set TF_LOG to the intended log level together with TF_LOG_PATH and rerun the failing Terraform command.
- Use an import block or terraform import with the correct resource address and provider-specific remote ID before a reviewed plan.
- Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping.
- Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state.
- Identify the exact resource instance address from terraform state list and inspect it with terraform state show.
Explanation
Correct Answers
C:Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping. Configuration-driven import blocks can make existing-resource adoption repeatable and part of a reviewed execution plan. A justified correction is: Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state. This forms one element of the required two-step diagnosis and correction. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
D:Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state. Configuration-driven import blocks can make existing-resource adoption repeatable and part of a reviewed execution plan. Confirm the cause with: Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping. A concrete acceptance test is: The next plan shows the intended objects being imported rather than created and adoption mappings remain reviewable in source. This forms one element of the required two-step diagnosis and correction. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
Incorrect Answers
A:Set TF_LOG to the intended log level together with TF_LOG_PATH and rerun the failing Terraform command. This relates to tf_log_path requires enabled logging rather than the matching diagnosis-and-remediation pair required here. Check: Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping. Then change: Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state.
B:Use an import block or terraform import with the correct resource address and provider-specific remote ID before a reviewed plan. This relates to terraform import binds preexisting remote object rather than the matching diagnosis-and-remediation pair required here. Check: Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping. Then change: Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
E:Identify the exact resource instance address from terraform state list and inspect it with terraform state show. This relates to state show inspects one stored resource instance rather than the matching diagnosis-and-remediation pair required here. Check: Inspect configuration import blocks, provider object IDs and candidate resource declarations for consistent address mapping. Then change: Declare reviewed import blocks for known objects, plan the adoption, and reconcile configuration with the resulting resource state. This matters here because while diagnosing a Terraform state or import issue in a staging workspace, the following condition occurs: An….
Question 234
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: An organization provisions one application's storage in one cloud and DNS in another by maintaining incompatible manual deployment procedures. The team must establish a reproducible and auditable infrastructure change. What targeted engineering response should the team implement?
- Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms.
- Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices.
- Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
- Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
Explanation
Correct Answer
D:Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. Terraform provides a common declarative language while providers translate configuration operations into target platform APIs. Confirm the cause with: Check whether each API integration has a Terraform provider and how dependencies pass resource attributes between configurations. A concrete acceptance test is: One reviewed workflow coordinates both cloud resources without pretending Terraform replaces the different underlying provider APIs. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
Incorrect Answers
A:Create separate provider-aware modules behind a shared application interface rather than treating resource type names as portable across platforms. This could address provider-neutral infrastructure pattern without identical resource types, but it does not correct the indicated multi-cloud providers under one terraform workflow mechanism. The relevant fix is: Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values. This matters here because while migrating a manually maintained development environment into reviewed Terraform configuration, the following….
B:Assign authoritative ownership to one control plane or explicitly divide attribute responsibility using supported lifecycle practices. This could address terraform resource ownership boundary, but it does not correct the indicated multi-cloud providers under one terraform workflow mechanism. The relevant fix is: Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
C:Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. This could address terraform plan review as change safety barrier, but it does not correct the indicated multi-cloud providers under one terraform workflow mechanism. The relevant fix is: Use the relevant approved providers in Terraform and define cross-service references through managed configuration outputs or values.
Question 235
In a clean CI runner initializing a Terraform root configuration, the following condition occurs: A fresh Terraform initialization succeeds, but planning an external service resource fails with an access-denied response and the team tries reinstalling the plugin. The engineers must keep provider choices and identities reproducible. Select TWO: the decisive first check and the change that directly addresses the problem.
- Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID.
- Keep provider source and version in required_providers and configure authentication via supported provider settings or short-lived environment credentials.
- Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions.
- Examine required_providers version constraints and the selected version recorded in the dependency lock file.
- Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin.
Explanation
Correct Answers
C:Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions. Successful installation proves a plugin is present, not that the provider identity has permission to operate its remote API. A justified correction is: Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin. This forms one element of the required two-step diagnosis and correction.
E:Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin. Successful installation proves a plugin is present, not that the provider identity has permission to operate its remote API. Confirm the cause with: Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions. A concrete acceptance test is: The same initialized provider can read the required resource metadata using an approved identity and the access-denied error disappears. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
A:Use resource references and output values so computed identifiers resolve after creation rather than hardcoding an invented ID. This relates to resource attribute outputs supplied by state rather than the matching diagnosis-and-remediation pair required here. Check: Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions. Then change: Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin.
B:Keep provider source and version in required_providers and configure authentication via supported provider settings or short-lived environment credentials. This relates to provider block credentials versus required_providers rather than the matching diagnosis-and-remediation pair required here. Check: Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions. Then change: Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin.
D:Examine required_providers version constraints and the selected version recorded in the dependency lock file. This relates to provider version range semantics rather than the matching diagnosis-and-remediation pair required here. Check: Separate plugin resolution logs from runtime API authorization errors and inspect the provider's active identity and scoped permissions. Then change: Correct the provider's supported credentials or least-privilege permissions without changing a successfully installed plugin.
Question 236
During a controlled module integration test for a production Terraform stack, the following condition occurs: A database provider supports a write-only password argument, but an engineer uses a normal stored password argument and checks the plan artifact into an unsecured archive. The desired fix must avoid unrelated resource changes. Which TWO complementary choices identify the cause and implement the appropriate fix? Select TWO.
- Use an appropriate map type with key-based lookup or redesign the input as a list if order-based indexing is truly intended.
- Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required.
- Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements.
- Inspect variable input expectations and whether an explicit validation condition can reject invalid strings early.
- Declare the token input as ephemeral = true and pass it only into compatible runtime contexts such as provider configuration.
Explanation
Correct Answers
B:Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required. Write-only resource arguments accept values during an operation without saving those values into Terraform's managed state. Confirm the cause with: Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. A concrete acceptance test is: The provider receives the approved new secret without persisting its plaintext in Terraform's plan or state snapshots. This forms one element of the required two-step diagnosis and correction. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: A….
C:Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. Write-only resource arguments accept values during an operation without saving those values into Terraform's managed state. A justified correction is: Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required. This forms one element of the required two-step diagnosis and correction. This matters here because during a controlled module integration test for a production Terraform stack, the following condition occurs: A….
Incorrect Answers
A:Use an appropriate map type with key-based lookup or redesign the input as a list if order-based indexing is truly intended. This relates to map versus list addressing for environment inputs rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. Then change: Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required.
D:Inspect variable input expectations and whether an explicit validation condition can reject invalid strings early. This relates to input variable custom validation rule rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. Then change: Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required.
E:Declare the token input as ephemeral = true and pass it only into compatible runtime contexts such as provider configuration. This relates to ephemeral variable for short-lived token in terraform 1.12 rather than the matching diagnosis-and-remediation pair required here. Check: Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. Then change: Supply a supported write-only password argument from an ephemeral value and use the provider's explicit version mechanism when required.
Question 237
While migrating a manually maintained development environment into reviewed Terraform configuration, the following condition occurs: A team cannot explain who enlarged production compute capacity because engineers edit cloud resources without changes to an auditable repository. The team must establish a reproducible and auditable infrastructure change. Select TWO: the decisive first check and the change that directly addresses the problem.
- Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations.
- Encode the network and firewall resources in version-controlled Terraform and require a reviewed plan in the change process.
- Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration.
- Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization.
- Check whether each API integration has a Terraform provider and how dependencies pass resource attributes between configurations.
Explanation
Correct Answers
A:Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations. IaC enables reproducible review and history when configuration is versioned and the apply workflow is controlled. Confirm the cause with: Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration. A concrete acceptance test is: An auditor can identify the approved commit and plan that caused a deliberate infrastructure capacity change. This forms one element of the required two-step diagnosis and correction.
C:Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration. IaC enables reproducible review and history when configuration is versioned and the apply workflow is controlled. A justified correction is: Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations. This forms one element of the required two-step diagnosis and correction.
Incorrect Answers
B:Encode the network and firewall resources in version-controlled Terraform and require a reviewed plan in the change process. This relates to terraform configuration as reviewable infrastructure specification rather than the matching diagnosis-and-remediation pair required here. Check: Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration. Then change: Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations.
D:Run a reviewed Terraform plan before application, investigate unexpected replacements, and require appropriate authorization. This relates to terraform plan review as change safety barrier rather than the matching diagnosis-and-remediation pair required here. Check: Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration. Then change: Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations.
E:Check whether each API integration has a Terraform provider and how dependencies pass resource attributes between configurations. This relates to multi-cloud providers under one terraform workflow rather than the matching diagnosis-and-remediation pair required here. Check: Inspect infrastructure change logs, commit reviews, and whether the active resources map to revision-controlled Terraform configuration. Then change: Require reviewed Terraform commits and corresponding plan evidence for production changes rather than console-only alterations.
Question 238
During a clean initialization of a newly composed infrastructure root module, the following condition occurs: A root Terraform stack tries to consume a network ID that the child module computes but does not publish as an output. The team must preserve reproducibility across callers. Which proposed remediation solves this failure without masking its cause?
- Add the intended child output declaration and access it through module.network.<output_name> in the caller.
- Pass sensitive inputs through appropriately typed child variables and avoid exposing them via normal outputs or logs.
- Use the supported Git module source form with the correct double-slash subdirectory and pinned revision ref.
- Update the module version together with dependent output references and validate the full root configuration before applying.
Explanation
Correct Answer
A:Add the intended child output declaration and access it through module.network.<output_name> in the caller. Output values are the supported way for a module to expose results to its parent; ordinary child locals are not exported. Confirm the cause with: Inspect the child module's output blocks and root expressions that refer to module.network values. A concrete acceptance test is: The caller can reference the exact authorized network ID without using private child implementation resource addresses. This matters here because during a clean initialization of a newly composed infrastructure root module, the following condition occurs: A root….
Incorrect Answers
B:Pass sensitive inputs through appropriately typed child variables and avoid exposing them via normal outputs or logs. This could address sensitive input forwarding between nested modules, but it does not correct the indicated child output exposure to calling module mechanism. The relevant fix is: Add the intended child output declaration and access it through module.network.<output_name> in the caller. This matters here because during a clean initialization of a newly composed infrastructure root module, the following condition occurs: A root….
C:Use the supported Git module source form with the correct double-slash subdirectory and pinned revision ref. This could address git module source with explicit subdirectory, but it does not correct the indicated child output exposure to calling module mechanism. The relevant fix is: Add the intended child output declaration and access it through module.network.<output_name> in the caller. This matters here because during a clean initialization of a newly composed infrastructure root module, the following condition occurs: A root….
D:Update the module version together with dependent output references and validate the full root configuration before applying. This could address module upgrade plan review with changed outputs, but it does not correct the indicated child output exposure to calling module mechanism. The relevant fix is: Add the intended child output declaration and access it through module.network.<output_name> in the caller.
Question 239
When reviewing a reusable Terraform HCL configuration before deployment, the following condition occurs: A Terraform module copies a long-lived API token directly into a committed .tf file so an infrastructure deployment can authenticate to an external service. The engineer must respect declared resource contracts and data security boundaries. Which diagnostic check provides the strongest evidence for the underlying problem?
- Inspect the repository for embedded secrets and review supported Vault provider/ephemeral integration and token access policy.
- Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements.
- Inspect state instance addresses and compare count positions against stable business keys.
- Inspect the subnet and server blocks for real attribute references versus unrelated hardcoded strings.
Explanation
Correct Answer
A:Inspect the repository for embedded secrets and review supported Vault provider/ephemeral integration and token access policy. Secrets management separates credential issuance from infrastructure definitions; committed passwords remain exposed even if displayed as sensitive. A justified correction is: Rotate the exposed token and retrieve needed credentials through an approved Vault-based ephemeral or runtime authentication flow. This matters here because when reviewing a reusable Terraform HCL configuration before deployment, the following condition occurs: A Terraform….
Incorrect Answers
B:Inspect the provider resource schema for supported write-only arguments and associated rotation or version requirements. This inspects write-only provider argument for managed secret rotation rather than the reported vault credential lookup without hardcoding secret values issue. The decisive investigation is: Inspect the repository for embedded secrets and review supported Vault provider/ephemeral integration and token access policy.
C:Inspect state instance addresses and compare count positions against stable business keys. This inspects for_each stable identity instead of count index rather than the reported vault credential lookup without hardcoding secret values issue. The decisive investigation is: Inspect the repository for embedded secrets and review supported Vault provider/ephemeral integration and token access policy.
D:Inspect the subnet and server blocks for real attribute references versus unrelated hardcoded strings. This inspects implicit dependency through resource attribute reference rather than the reported vault credential lookup without hardcoding secret values issue. The decisive investigation is: Inspect the repository for embedded secrets and review supported Vault provider/ephemeral integration and token access policy.
Question 240
During a clean initialization of a newly composed infrastructure root module, the following condition occurs: An engineer references a public registry module using a Git URL but also supplies a registry version argument and expects Terraform to resolve it as a registry source. The team must preserve reproducibility across callers. Which diagnostic check provides the strongest evidence for the underlying problem?
- Inspect the Git source URL, requested revision ref, and the actual module subdirectory layout.
- Inspect the module source syntax and whether the source is a registry address or a generic VCS URL.
- Check the module source address, allowed version range and current module selections from initialization.
- Compare the upgraded module's documented input/output contract to root references before approving the module version change.
Explanation
Correct Answer
B:Inspect the module source syntax and whether the source is a registry address or a generic VCS URL. Registry sources support the version argument; a Git source generally selects its revision through its source query ref. A justified correction is: Use a valid registry module address when controlling versions with the module version argument, or pin an appropriate Git ref in a VCS source URL.
Incorrect Answers
A:Inspect the Git source URL, requested revision ref, and the actual module subdirectory layout. This inspects git module source with explicit subdirectory rather than the reported registry module source naming contract issue. The decisive investigation is: Inspect the module source syntax and whether the source is a registry address or a generic VCS URL.
C:Check the module source address, allowed version range and current module selections from initialization. This inspects registry module version pin to avoid breaking releases rather than the reported registry module source naming contract issue. The decisive investigation is: Inspect the module source syntax and whether the source is a registry address or a generic VCS URL.
D:Compare the upgraded module's documented input/output contract to root references before approving the module version change. This inspects module upgrade plan review with changed outputs rather than the reported registry module source naming contract issue. The decisive investigation is: Inspect the module source syntax and whether the source is a registry address or a generic VCS URL.