McAfee-Secured Website

Exam Bundle

Exam Code: Terraform Associate 004

Exam Name HashiCorp Certified: Terraform Associate (004)

Certification Provider: HashiCorp

Corresponding Certification: Terraform Associate

HashiCorp Terraform Associate 004 Bundle $19.99

100% HashiCorp Terraform Associate 004 Guaranteed Success With Testking Training Materials

Get Real Terraform Associate 004 Exam Questions & Expert Verified Answers as Experienced on the Real Exam!

  • Questions & Answers

    Terraform Associate 004 Questions & Answers

    167 Questions & Answers

    The ultimate exam preparation tool, Questions & Answers mirrors the actual Terraform Associate 004 exam while allowing you to hone and measure every aspect of your test-taking ability.

  • Study Guide

    Terraform Associate 004 Study Guide

    285 PDF Pages

    Developed by industry experts, this 285-page guide spells out in painstaking detail all of the information you need to ace Terraform Associate 004 exam.

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

Satisfaction Guaranteed

Money Back Guarantee

Testking provides hassle-free money back guarantee with our products. That is because we have 100% trust in the abilities of our professional and experience product team, and our record is a proof of that.

99.6% PASS RATE
Total Cost: $154.98
Bundle Price: $134.99

Purchase Individually

  • Questions & Answers

    Questions & Answers

    167 Questions

    $124.99
  • Study Guide

    Study Guide

    285 PDF Pages

    $29.99

HashiCorp Terraform Associate 004 Practice Test 48

Question 470

A controlled test for Clearwater Systems focuses on the original failure: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. Which observation best confirms that the proposed correction worked?

  1. terraform validate succeeds and both condition paths evaluate to the expected type.
  2. The CLI version is checked independently and the provider version change appears in the lock file.
  3. The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.
  4. terraform init finds the directory and validation resolves its variables and resources.

Explanation

Correct Answer

C:

The chosen resource schema confirms write-only support and the password value is absent from stored plans and state. This directly verifies the corrective action: Use a provider-supported write-only argument together with an ephemeral secret source when available. The measured result specifically addresses the failure at Clearwater Systems: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password.

Incorrect Answers

A:

terraform validate succeeds and both condition paths evaluate to the expected type. This evidence would validate a DIFFERENT correction: Make both branches return compatible types and keep the condition a Boolean expression. That different correction addresses: An operator uses a conditional expression with incompatible branch value types and receives a configuration type error. It does not establish that the Clearwater Systems issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

B:

The CLI version is checked independently and the provider version change appears in the lock file. This evidence would validate a DIFFERENT correction: Manage CLI version installation separately and use init -upgrade only for dependency selections supported by configuration. That different correction addresses: A team assumes terraform init -upgrade also updates the Terraform CLI executable on engineers' laptops. It does not establish that the Clearwater Systems issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

D:

terraform init finds the directory and validation resolves its variables and resources. This evidence would validate a DIFFERENT correction: Correct the relative module source path and initialize the configuration to load the existing local module. That different correction addresses: A module declaration points to a local relative folder, but the folder has been renamed and initialization cannot find it. It does not establish that the Clearwater Systems issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

Question 471

A proposed infrastructure change for Valleyline Technology must address the following observed failure: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. Which proposed fix addresses the reported root cause?

  1. Use a map(string) or suitable object keyed by environment name to preserve explicit associations.
  2. Use distinct Terraform providers for the supported cloud and on-premises APIs in one configuration or coordinated modules.
  3. Record each caller's module source and pinned version and plan deliberate upgrade waves.
  4. Use a provider-supported write-only argument together with an ephemeral secret source when available.

Explanation

Correct Answer

D:

Use a provider-supported write-only argument together with an ephemeral secret source when available. This is targeted to the observed Terraform issue: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. At Valleyline Technology, the acceptance criterion is not merely a valid plan; the team should verify: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

Incorrect Answers

A:

Use a map(string) or suitable object keyed by environment name to preserve explicit associations. This would be suitable for a DIFFERENT Terraform problem: A network module uses a list to represent environment-name-to-CIDR pairs and repeatedly assigns the wrong CIDR by index. It does not directly resolve the Valleyline Technology failure: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The required acceptance evidence instead is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

B:

Use distinct Terraform providers for the supported cloud and on-premises APIs in one configuration or coordinated modules. This would be suitable for a DIFFERENT Terraform problem: A hybrid IT team wants to declare managed cloud resources alongside supported on-premises virtualization objects without separate ad hoc scripts. It does not directly resolve the Valleyline Technology failure: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The required acceptance evidence instead is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

C:

Record each caller's module source and pinned version and plan deliberate upgrade waves. This would be suitable for a DIFFERENT Terraform problem: An organization updates a shared module but deployers cannot identify which consuming environments still use older versions. It does not directly resolve the Valleyline Technology failure: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The required acceptance evidence instead is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

Question 472

The Terraform change owner at Valleyline Technology seeks a verifiable outcome for: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. What result would demonstrate that the identified problem is actually resolved?

  1. The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.
  2. Lookup of a named environment yields its intended CIDR independently of input ordering.
  3. The combined plan resolves both provider schemas and shows the intended hybrid changes.
  4. An inventory identifies installed versions and an upgraded workspace confirms the new module version in its configuration.

Explanation

Correct Answer

A:

The chosen resource schema confirms write-only support and the password value is absent from stored plans and state. This directly verifies the corrective action: Use a provider-supported write-only argument together with an ephemeral secret source when available. The measured result specifically addresses the failure at Valleyline Technology: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password.

Incorrect Answers

B:

Lookup of a named environment yields its intended CIDR independently of input ordering. This evidence would validate a DIFFERENT correction: Use a map(string) or suitable object keyed by environment name to preserve explicit associations. That different correction addresses: A network module uses a list to represent environment-name-to-CIDR pairs and repeatedly assigns the wrong CIDR by index. It does not establish that the Valleyline Technology issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

C:

The combined plan resolves both provider schemas and shows the intended hybrid changes. This evidence would validate a DIFFERENT correction: Use distinct Terraform providers for the supported cloud and on-premises APIs in one configuration or coordinated modules. That different correction addresses: A hybrid IT team wants to declare managed cloud resources alongside supported on-premises virtualization objects without separate ad hoc scripts. It does not establish that the Valleyline Technology issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

D:

An inventory identifies installed versions and an upgraded workspace confirms the new module version in its configuration. This evidence would validate a DIFFERENT correction: Record each caller's module source and pinned version and plan deliberate upgrade waves. That different correction addresses: An organization updates a shared module but deployers cannot identify which consuming environments still use older versions. It does not establish that the Valleyline Technology issue has been corrected: An engineer supplies a password to a standard provider resource argument and expects Terraform to omit it from state merely because the argument is called password. The relevant measured outcome is: The chosen resource schema confirms write-only support and the password value is absent from stored plans and state.

Question 473

A proposed infrastructure change for Brightside Cloud Works must address the following observed failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. What is the most appropriate corrective action for this Terraform scenario?

  1. Pass provider configurations from the caller and avoid nested provider configuration in reusable child modules where possible.
  2. Use an appropriate documented replacement action such as terraform apply -replace with review.
  3. Update the provider-defined write-only version marker according to its documented rotation mechanism.
  4. Add an explicit child output block and reference it through the module namespace from the root.

Explanation

Correct Answer

C:

Update the provider-defined write-only version marker according to its documented rotation mechanism. This is targeted to the observed Terraform issue: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. At Brightside Cloud Works, the acceptance criterion is not merely a valid plan; the team should verify: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Incorrect Answers

A:

Pass provider configurations from the caller and avoid nested provider configuration in reusable child modules where possible. This would be suitable for a DIFFERENT Terraform problem: An application module quietly configures an independent provider account, conflicting with the root's deployment credentials. It does not directly resolve the Brightside Cloud Works failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

B:

Use an appropriate documented replacement action such as terraform apply -replace with review. This would be suitable for a DIFFERENT Terraform problem: An application needs an isolated replacement of a damaged object, but the operator tries to edit its serialized state to mark it broken. It does not directly resolve the Brightside Cloud Works failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

D:

Add an explicit child output block and reference it through the module namespace from the root. This would be suitable for a DIFFERENT Terraform problem: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not directly resolve the Brightside Cloud Works failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Question 474

The Terraform change owner at Brightside Cloud Works seeks a verifiable outcome for: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. Which controlled check would validate the remediation?

  1. The plan clearly shows replacement of the intended resource address while other resources remain unchanged.
  2. The module's resources resolve the caller-approved account and no unexpected credentials are used.
  3. Validation resolves the child output and the value appears after successful creation.
  4. The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Explanation

Correct Answer

D:

The plan detects the version change and the provider applies the new secret without persisting the secret itself. This directly verifies the corrective action: Update the provider-defined write-only version marker according to its documented rotation mechanism. The measured result specifically addresses the failure at Brightside Cloud Works: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state.

Incorrect Answers

A:

The plan clearly shows replacement of the intended resource address while other resources remain unchanged. This evidence would validate a DIFFERENT correction: Use an appropriate documented replacement action such as terraform apply -replace with review. That different correction addresses: An application needs an isolated replacement of a damaged object, but the operator tries to edit its serialized state to mark it broken. It does not establish that the Brightside Cloud Works issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

B:

The module's resources resolve the caller-approved account and no unexpected credentials are used. This evidence would validate a DIFFERENT correction: Pass provider configurations from the caller and avoid nested provider configuration in reusable child modules where possible. That different correction addresses: An application module quietly configures an independent provider account, conflicting with the root's deployment credentials. It does not establish that the Brightside Cloud Works issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

C:

Validation resolves the child output and the value appears after successful creation. This evidence would validate a DIFFERENT correction: Add an explicit child output block and reference it through the module namespace from the root. That different correction addresses: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not establish that the Brightside Cloud Works issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Question 475

During repository review at Bayview Systems, the platform team reports: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. Which action would best restore the intended infrastructure-as-code workflow?

  1. Update the provider-defined write-only version marker according to its documented rotation mechanism.
  2. Pin the Git module source to a reviewed commit or immutable release tag.
  3. Add an explicit child output block and reference it through the module namespace from the root.
  4. Use Terraform providers whose supported resources correspond to the cloud and source-control APIs, with explicit dependencies where needed.

Explanation

Correct Answer

A:

Update the provider-defined write-only version marker according to its documented rotation mechanism. This is targeted to the observed Terraform issue: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. At Bayview Systems, the acceptance criterion is not merely a valid plan; the team should verify: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Incorrect Answers

B:

Pin the Git module source to a reviewed commit or immutable release tag. This would be suitable for a DIFFERENT Terraform problem: A Git-based module source points to a mutable main branch and production plans change without a reviewed module upgrade. It does not directly resolve the Bayview Systems failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

C:

Add an explicit child output block and reference it through the module namespace from the root. This would be suitable for a DIFFERENT Terraform problem: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not directly resolve the Bayview Systems failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

D:

Use Terraform providers whose supported resources correspond to the cloud and source-control APIs, with explicit dependencies where needed. This would be suitable for a DIFFERENT Terraform problem: A team needs to coordinate infrastructure and a managed source-control repository but assumes Terraform's execution model requires separate tools for every API. It does not directly resolve the Bayview Systems failure: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The required acceptance evidence instead is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Question 476

An acceptance reviewer at Bayview Systems must validate the fix for: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. Which observation best confirms that the proposed correction worked?

  1. Validation resolves the child output and the value appears after successful creation.
  2. The plan detects the version change and the provider applies the new secret without persisting the secret itself.
  3. Two clean initializations retrieve the same approved source revision.
  4. One reviewed plan accounts for both services and identifies which provider owns each operation.

Explanation

Correct Answer

B:

The plan detects the version change and the provider applies the new secret without persisting the secret itself. This directly verifies the corrective action: Update the provider-defined write-only version marker according to its documented rotation mechanism. The measured result specifically addresses the failure at Bayview Systems: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state.

Incorrect Answers

A:

Validation resolves the child output and the value appears after successful creation. This evidence would validate a DIFFERENT correction: Add an explicit child output block and reference it through the module namespace from the root. That different correction addresses: A deployment consumes an output from a child module but forgets to declare the output in the module itself. It does not establish that the Bayview Systems issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

C:

Two clean initializations retrieve the same approved source revision. This evidence would validate a DIFFERENT correction: Pin the Git module source to a reviewed commit or immutable release tag. That different correction addresses: A Git-based module source points to a mutable main branch and production plans change without a reviewed module upgrade. It does not establish that the Bayview Systems issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

D:

One reviewed plan accounts for both services and identifies which provider owns each operation. This evidence would validate a DIFFERENT correction: Use Terraform providers whose supported resources correspond to the cloud and source-control APIs, with explicit dependencies where needed. That different correction addresses: A team needs to coordinate infrastructure and a managed source-control repository but assumes Terraform's execution model requires separate tools for every API. It does not establish that the Bayview Systems issue has been corrected: A provider offers a write-only credential argument and companion version field, but a team rotates only the secret value and expects Terraform to detect the change from state. The relevant measured outcome is: The plan detects the version change and the provider applies the new secret without persisting the secret itself.

Question 477

During repository review at Arbor Cloud Systems, the platform team reports: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. How should the Terraform engineer correct this specific failure?

  1. Create a saved plan and apply that exact plan when the environment and approval workflow require consistency.
  2. Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation.
  3. Group related workspaces into HCP Terraform projects aligned to the owning teams or business units.
  4. Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values.

Explanation

Correct Answer

D:

Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values. This is targeted to the observed Terraform issue: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. At Arbor Cloud Systems, the acceptance criterion is not merely a valid plan; the team should verify: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

Incorrect Answers

A:

Create a saved plan and apply that exact plan when the environment and approval workflow require consistency. This would be suitable for a DIFFERENT Terraform problem: A release run compares old configurations against the cloud but never stores the changes that were actually approved. It does not directly resolve the Arbor Cloud Systems failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

B:

Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation. This would be suitable for a DIFFERENT Terraform problem: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. It does not directly resolve the Arbor Cloud Systems failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

C:

Group related workspaces into HCP Terraform projects aligned to the owning teams or business units. This would be suitable for a DIFFERENT Terraform problem: An HCP Terraform organization has dozens of workspaces with different business owners but no grouping or permission boundary. It does not directly resolve the Arbor Cloud Systems failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

Question 478

An acceptance reviewer at Arbor Cloud Systems must validate the fix for: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. Which verification outcome is the strongest evidence of the required correction?

  1. Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.
  2. The applied actions correspond to the approved saved plan rather than a newly recalculated unreviewed diff.
  3. The graph plans the creation and downstream reference without an early failing data-source lookup.
  4. Workspaces appear in the intended projects and project-scoped permissions match ownership.

Explanation

Correct Answer

A:

Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential. This directly verifies the corrective action: Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values. The measured result specifically addresses the failure at Arbor Cloud Systems: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive.

Incorrect Answers

B:

The applied actions correspond to the approved saved plan rather than a newly recalculated unreviewed diff. This evidence would validate a DIFFERENT correction: Create a saved plan and apply that exact plan when the environment and approval workflow require consistency. That different correction addresses: A release run compares old configurations against the cloud but never stores the changes that were actually approved. It does not establish that the Arbor Cloud Systems issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

C:

The graph plans the creation and downstream reference without an early failing data-source lookup. This evidence would validate a DIFFERENT correction: Represent the created object as a managed resource and reference its attributes directly rather than querying it before creation. That different correction addresses: A developer uses a data source for a new resource whose name is computed only after a separate resource is created, causing a premature lookup. It does not establish that the Arbor Cloud Systems issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

D:

Workspaces appear in the intended projects and project-scoped permissions match ownership. This evidence would validate a DIFFERENT correction: Group related workspaces into HCP Terraform projects aligned to the owning teams or business units. That different correction addresses: An HCP Terraform organization has dozens of workspaces with different business owners but no grouping or permission boundary. It does not establish that the Arbor Cloud Systems issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

Question 479

At Granite Software Works, the Terraform review finds this specific problem: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. What is the most appropriate corrective action for this Terraform scenario?

  1. Use supported HCP Terraform health assessments or Explorer capabilities where the subscription provides them.
  2. Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values.
  3. Use terraform fmt -recursive when consistent formatting of nested directories is required.
  4. Use an explicit number type and appropriate variable validation to restrict the accepted port range.

Explanation

Correct Answer

B:

Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values. This is targeted to the observed Terraform issue: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. At Granite Software Works, the acceptance criterion is not merely a valid plan; the team should verify: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

Incorrect Answers

A:

Use supported HCP Terraform health assessments or Explorer capabilities where the subscription provides them. This would be suitable for a DIFFERENT Terraform problem: A manager cannot identify which HCP Terraform workspaces have critical drift because teams inspect individual plans only. It does not directly resolve the Granite Software Works failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

C:

Use terraform fmt -recursive when consistent formatting of nested directories is required. This would be suitable for a DIFFERENT Terraform problem: A developer wants to format Terraform files across nested module folders but runs fmt only in the root. It does not directly resolve the Granite Software Works failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

D:

Use an explicit number type and appropriate variable validation to restrict the accepted port range. This would be suitable for a DIFFERENT Terraform problem: A module accepts a port number as an untyped string and downstream arithmetic and validation become inconsistent. It does not directly resolve the Granite Software Works failure: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The required acceptance evidence instead is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

Question 480

After corrective work at Granite Software Works, a reviewer requests measurable proof for: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. Which controlled check would validate the remediation?

  1. An eligible workspace's drift status or resource inventory is visible to authorized reviewers.
  2. A nested test module is reformatted and the recursive formatting check passes.
  3. Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.
  4. Invalid values are rejected and a numeric accepted value passes configuration checking.

Explanation

Correct Answer

C:

Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential. This directly verifies the corrective action: Load credentials through an authorized secret-management integration such as Vault and avoid committing or echoing values. The measured result specifically addresses the failure at Granite Software Works: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive.

Incorrect Answers

A:

An eligible workspace's drift status or resource inventory is visible to authorized reviewers. This evidence would validate a DIFFERENT correction: Use supported HCP Terraform health assessments or Explorer capabilities where the subscription provides them. That different correction addresses: A manager cannot identify which HCP Terraform workspaces have critical drift because teams inspect individual plans only. It does not establish that the Granite Software Works issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

B:

A nested test module is reformatted and the recursive formatting check passes. This evidence would validate a DIFFERENT correction: Use terraform fmt -recursive when consistent formatting of nested directories is required. That different correction addresses: A developer wants to format Terraform files across nested module folders but runs fmt only in the root. It does not establish that the Granite Software Works issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.

D:

Invalid values are rejected and a numeric accepted value passes configuration checking. This evidence would validate a DIFFERENT correction: Use an explicit number type and appropriate variable validation to restrict the accepted port range. That different correction addresses: A module accepts a port number as an untyped string and downstream arithmetic and validation become inconsistent. It does not establish that the Granite Software Works issue has been corrected: A team exposes production credentials in a committed Terraform configuration and claims using Vault is unnecessary because outputs are marked sensitive. The relevant measured outcome is: Repository and log scans find no hardcoded secret while an authorized run retrieves the needed credential.