mcAfee Secure Website
23

HashiCorp Terraform Associate 004 Bundle

Exam Code: Terraform Associate 004

Exam Name HashiCorp Certified: Terraform Associate (004)

Certification Provider: HashiCorp

Corresponding Certification: Terraform Associate

Terraform Associate 004 Training Materials $44.99

Reliable & Actual Study Materials for Terraform Associate 004 Exam Success

The Latest Terraform Associate 004 Exam Questions as Experienced in the Actual Test!

  • 24
    Questions & Answers

    Terraform Associate 004 Questions & Answers

    167 Questions & Answers

    Includes questions types found on actual exam such as drag and drop, simulation, type in, and fill in the blank.

  • 25
    Terraform Associate 004 Video Course

    Terraform Associate 004 Training Course

    118 Video Lectures

    Based on Real Life Scenarios which you will encounter in exam and learn by working with real equipment.

  • exam =30
    Study Guide

    Terraform Associate 004 Study Guide

    285 PDF Pages

    Study Guide developed by industry experts who have written exams in the past. They are technology-specific IT certification researchers with at least a decade of experience at Fortune 500 companies.

exam =32

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

Guarantee

Satisfaction Guaranteed

Pass4sure has a remarkable HashiCorp Candidate Success record. We're confident of our products and provide no hassle product exchange. That's how confident we are!

99.3% Pass Rate
Total Cost: $194.97
Bundle Price: $149.98

Purchase Individually

  • exam =34
    Questions & Answers

    Questions & Answers

    167 Questions

    $124.99
    exam =35
  • exam =37
    Terraform Associate 004 Video Course

    Training Course

    118 Video Lectures

    $39.99
  • exam =36
    Study Guide

    Study Guide

    285 PDF Pages

    $29.99

HashiCorp Terraform Associate 004 Practice Test 44

Question 430

A Terraform associate evaluates: A security review asks why a password remains in state even after its input variable is marked sensitive. Select TWO complementary responses: the appropriate action AND direct evidence it worked.

  1. An authorized workflow can consume the output while casual CLI display is redacted and backend access remains restricted.
  2. State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted.
  3. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  4. Treating a structured object like an untyped string makes required fields and attribute access error-prone.
  5. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.

Explanation

Correct Answers

B:

The observed situation is: A security review asks why a password remains in state even after its input variable is marked sensitive. The acceptance evidence is: State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. It verifies the corrective approach (Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.) and controls the risk: A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Checking an unrelated Terraform setting would not prove the stated requirement was met.

E:

The case says: A security review asks why a password remains in state even after its input variable is marked sensitive. The directly relevant Terraform response is: Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This addresses the related failure mode: A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Validate the result by checking: State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

A:

An authorized workflow can consume the output while casual CLI display is redacted and backend access remains restricted. This belongs to Outputs and sensitive display control (official objective 4c). Its separate risk is that a sensitive output designation hides normal CLI disclosure but does not guarantee the underlying state contains no secret. The question instead tests Sensitive variables versus ephemeral variables; that other safeguard alone does not verify it.

C:

Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. That addresses Provider write-only arguments and Vault integration (official objective 4h), specifically the hazard that using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Here the necessary action or evidence is the paired action State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted and separate validation Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions, not that separate control.

D:

Treating a structured object like an untyped string makes required fields and attribute access error-prone. This addresses Object and tuple structural types (official objective 4d). The separate hazard is that treating a structured object like an untyped string makes required fields and attribute access error-prone. It does not by itself satisfy the case-specific requirement for Sensitive variables versus ephemeral variables.

Question 431

A Terraform engineer reports: An operator wants to rotate a supported database password without retaining the plaintext in Terraform state. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  2. Use depends_on only when a real ordering requirement is not represented by an attribute reference, after checking implicit dependencies first.
  3. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  4. Reference a managed resource attribute directly in another resource argument so Terraform creates the appropriate dependency graph.

Explanation

Correct Answer

A:

The case says: An operator wants to rotate a supported database password without retaining the plaintext in Terraform state. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Use depends_on only when a real ordering requirement is not represented by an attribute reference, after checking implicit dependencies first. This is relevant to Explicit depends_on for hidden dependencies (official objective 4f). Its distinct failure risk is that terraform may not infer relationships that have no data reference, but excessive explicit dependencies can make plans unnecessarily conservative. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

C:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. That addresses Sensitive variables versus ephemeral variables (official objective 4h), specifically the hazard that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Here the necessary action or evidence is Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values, not that separate control.

D:

Reference a managed resource attribute directly in another resource argument so Terraform creates the appropriate dependency graph. This addresses Implicit dependency through attribute reference (official objective 4b). The separate hazard is that hardcoding an anticipated ID bypasses Terraform's graph and can reference a stale or nonexistent object. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 432

After a reviewed change, the team checks: An operator wants to rotate a supported database password without retaining the plaintext in Terraform state. Which evidence MOST directly proves the selected approach is working?

  1. State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted.
  2. A supported write-only argument updates the target without storing the supplied secret in state or plan.
  3. A root-level consumer resolves a declared module output and no undeclared child address is referenced.
  4. The replacement plan shows create-before-destroy ordering and a test confirms provider constraints permit both instances.

Explanation

Correct Answer

B:

The observed situation is: An operator wants to rotate a supported database password without retaining the plaintext in Terraform state. The acceptance evidence is: A supported write-only argument updates the target without storing the supplied secret in state or plan. It verifies the corrective approach (Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.) and controls the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

A:

State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

C:

A root-level consumer resolves a declared module output and no undeclared child address is referenced. That addresses Cross-module output references (official objective 4b), specifically the hazard that trying to reach directly into a child module's private resource address bypasses the module interface. Here the necessary action or evidence is A supported write-only argument updates the target without storing the supplied secret in state or plan, not that separate control.

D:

The replacement plan shows create-before-destroy ordering and a test confirms provider constraints permit both instances. This addresses Lifecycle create_before_destroy (official objective 4f). The separate hazard is that a replacement may fail if a globally unique name prevents a second object from existing simultaneously. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 433

A configuration review reveals: A team expects every provider attribute ending in password to support write-only semantics. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  2. Declare outputs for intended consumer values and mark sensitive outputs appropriately while separately protecting any state that may contain them.
  3. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  4. Use object type constraints for named fields and tuple for fixed-position heterogeneous elements when modeling structured input variables.

Explanation

Correct Answer

C:

The case says: A team expects every provider attribute ending in password to support write-only semantics. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

A:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

B:

Declare outputs for intended consumer values and mark sensitive outputs appropriately while separately protecting any state that may contain them. This is relevant to Outputs and sensitive display control (official objective 4c). Its distinct failure risk is that a sensitive output designation hides normal CLI disclosure but does not guarantee the underlying state contains no secret. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

D:

Use object type constraints for named fields and tuple for fixed-position heterogeneous elements when modeling structured input variables. This addresses Object and tuple structural types (official objective 4d). The separate hazard is that treating a structured object like an untyped string makes required fields and attribute access error-prone. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 434

A Terraform governance audit identifies: A team expects every provider attribute ending in password to support write-only semantics. What risk MOST directly explains why a correction is needed?

  1. Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist.
  2. Using a set where stable indices are required can make addressing and ordering assumptions invalid.
  3. A replacement may fail if a globally unique name prevents a second object from existing simultaneously.
  4. A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence.

Explanation

Correct Answer

A:

The reported issue (A team expects every provider attribute ending in password to support write-only semantics) exposes the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. The corrective action is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. Confirm with: A supported write-only argument updates the target without storing the supplied secret in state or plan. The risk is specific to this configuration or operation, not an unrelated Terraform feature.

Incorrect Answers

B:

Using a set where stable indices are required can make addressing and ordering assumptions invalid. This is relevant to Terraform list set and map collections (official objective 4d). Its distinct failure risk is that using a set where stable indices are required can make addressing and ordering assumptions invalid. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

C:

A replacement may fail if a globally unique name prevents a second object from existing simultaneously. That is the exact risk associated with Lifecycle create_before_destroy (official objective 4f), not the required Provider write-only arguments and Vault integration outcome.

D:

A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. This addresses Sensitive variables versus ephemeral variables (official objective 4h). The separate hazard is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 435

During a controlled infrastructure change, a team observes: A Vault-managed ephemeral secret should be consumed by an approved write-only field. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  2. Use a resource block to manage an object lifecycle and a data block to read information about an existing object without claiming its lifecycle.
  3. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  4. Declare outputs for intended consumer values and mark sensitive outputs appropriately while separately protecting any state that may contain them.

Explanation

Correct Answer

C:

The case says: A Vault-managed ephemeral secret should be consumed by an approved write-only field. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

A:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

B:

Use a resource block to manage an object lifecycle and a data block to read information about an existing object without claiming its lifecycle. This is relevant to Managed resources versus data sources (official objective 4a). Its distinct failure risk is that a data source query alone will not create or delete the referenced infrastructure object. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

D:

Declare outputs for intended consumer values and mark sensitive outputs appropriately while separately protecting any state that may contain them. This addresses Outputs and sensitive display control (official objective 4c). The separate hazard is that a sensitive output designation hides normal CLI disclosure but does not guarantee the underlying state contains no secret. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 436

An operator wants proof regarding: A Vault-managed ephemeral secret should be consumed by an approved write-only field. Which evidence MOST directly proves the selected approach is working?

  1. A supported write-only argument updates the target without storing the supplied secret in state or plan.
  2. Variable validation and console inspection show each named attribute or tuple position has the expected type.
  3. State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted.
  4. The plan creates only declared managed resources while existing data-source objects are read and remain unmanaged.

Explanation

Correct Answer

A:

The observed situation is: A Vault-managed ephemeral secret should be consumed by an approved write-only field. The acceptance evidence is: A supported write-only argument updates the target without storing the supplied secret in state or plan. It verifies the corrective approach (Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.) and controls the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

B:

Variable validation and console inspection show each named attribute or tuple position has the expected type. This is relevant to Object and tuple structural types (official objective 4d). Its distinct failure risk is that treating a structured object like an untyped string makes required fields and attribute access error-prone. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

C:

State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. That addresses Sensitive variables versus ephemeral variables (official objective 4h), specifically the hazard that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Here the necessary action or evidence is A supported write-only argument updates the target without storing the supplied secret in state or plan, not that separate control.

D:

The plan creates only declared managed resources while existing data-source objects are read and remain unmanaged. This addresses Managed resources versus data sources (official objective 4a). The separate hazard is that a data source query alone will not create or delete the referenced infrastructure object. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 437

An infrastructure deployment design calls for: A provider upgrade introduces a write-only argument and its secret version trigger must be coordinated. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  2. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  3. Reference a managed resource attribute directly in another resource argument so Terraform creates the appropriate dependency graph.
  4. Use a resource block to manage an object lifecycle and a data block to read information about an existing object without claiming its lifecycle.

Explanation

Correct Answer

A:

The case says: A provider upgrade introduces a write-only argument and its secret version trigger must be coordinated. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

B:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This is relevant to Sensitive variables versus ephemeral variables (official objective 4h). Its distinct failure risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

C:

Reference a managed resource attribute directly in another resource argument so Terraform creates the appropriate dependency graph. That addresses Implicit dependency through attribute reference (official objective 4b), specifically the hazard that hardcoding an anticipated ID bypasses Terraform's graph and can reference a stale or nonexistent object. Here the necessary action or evidence is Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values, not that separate control.

D:

Use a resource block to manage an object lifecycle and a data block to read information about an existing object without claiming its lifecycle. This addresses Managed resources versus data sources (official objective 4a). The separate hazard is that a data source query alone will not create or delete the referenced infrastructure object. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 438

A production-readiness review highlights: A provider upgrade introduces a write-only argument and its secret version trigger must be coordinated. What risk MOST directly explains why a correction is needed?

  1. A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence.
  2. Manually duplicating derived labels and tags across resources invites inconsistency and errors.
  3. Terraform may not infer relationships that have no data reference, but excessive explicit dependencies can make plans unnecessarily conservative.
  4. Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist.

Explanation

Correct Answer

D:

The reported issue (A provider upgrade introduces a write-only argument and its secret version trigger must be coordinated) exposes the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. The corrective action is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. Confirm with: A supported write-only argument updates the target without storing the supplied secret in state or plan. The risk is specific to this configuration or operation, not an unrelated Terraform feature.

Incorrect Answers

A:

A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

B:

Manually duplicating derived labels and tags across resources invites inconsistency and errors. This is relevant to Terraform expressions and built-in functions (official objective 4e). Its distinct failure risk is that manually duplicating derived labels and tags across resources invites inconsistency and errors. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

C:

Terraform may not infer relationships that have no data reference, but excessive explicit dependencies can make plans unnecessarily conservative. That is the exact risk associated with Explicit depends_on for hidden dependencies (official objective 4f), not the required Provider write-only arguments and Vault integration outcome.

Question 439

An operations team needs to resolve: A security tester checks whether a newly supplied secret appears in the saved execution plan. Which action BEST addresses the specific Terraform Associate (004) requirement?

  1. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  2. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  3. Use a variable validation block with a clear condition and error message to reject invalid caller inputs before changes are planned.
  4. Use lifecycle precondition or postcondition for enforceable resource assertions and check blocks for nonblocking health diagnostics when appropriate.

Explanation

Correct Answer

B:

The case says: A security tester checks whether a newly supplied secret appears in the saved execution plan. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

Incorrect Answers

A:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

C:

Use a variable validation block with a clear condition and error message to reject invalid caller inputs before changes are planned. That addresses Input variable validation rules (official objective 4g), specifically the hazard that malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid. Here the necessary action or evidence is Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values, not that separate control.

D:

Use lifecycle precondition or postcondition for enforceable resource assertions and check blocks for nonblocking health diagnostics when appropriate. This addresses Preconditions postconditions and checks (official objective 4g). The separate hazard is that confusing advisory checks with hard validation gates can let an unsafe value pass despite a warning. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.

Question 440

A Terraform associate evaluates: A security tester checks whether a newly supplied secret appears in the saved execution plan. Select TWO complementary responses: the appropriate action AND direct evidence it worked.

  1. Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.
  2. Malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid.
  3. Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.
  4. A small console evaluation verifies indexing and keys match the intended collection semantics.
  5. A supported write-only argument updates the target without storing the supplied secret in state or plan.

Explanation

Correct Answers

C:

The case says: A security tester checks whether a newly supplied secret appears in the saved execution plan. The directly relevant Terraform response is: Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. This addresses the related failure mode: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Validate the result by checking: A supported write-only argument updates the target without storing the supplied secret in state or plan. The selection matches this objective, rather than a different Terraform administration task.

E:

The observed situation is: A security tester checks whether a newly supplied secret appears in the saved execution plan. The acceptance evidence is: A supported write-only argument updates the target without storing the supplied secret in state or plan. It verifies the corrective approach (Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values.) and controls the risk: Using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Checking an unrelated Terraform setting would not prove the stated requirement was met.

Incorrect Answers

A:

Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This belongs to Sensitive variables versus ephemeral variables (official objective 4h). Its separate risk is that a secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. The question instead tests Provider write-only arguments and Vault integration; that other safeguard alone does not verify it.

B:

Malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid. This is relevant to Input variable validation rules (official objective 4g). Its distinct failure risk is that malformed input values can drive unsupported sizes or unsafe configuration even when their basic types are valid. The present question tests Provider write-only arguments and Vault integration, which this measure alone does not establish.

D:

A small console evaluation verifies indexing and keys match the intended collection semantics. This addresses Terraform list set and map collections (official objective 4d). The separate hazard is that using a set where stable indices are required can make addressing and ordering assumptions invalid. It does not by itself satisfy the case-specific requirement for Provider write-only arguments and Vault integration.