nerdexam
HashiCorp

TA-002-P · Question #15

What is not processed when running a terraform refresh?

The correct answer is C. Credentials D. Cloud provider. When terraform refresh (or the refresh phase of plan/apply) runs, it reads the configuration and state to query the cloud provider, updating the state, but it does not intrinsically modify or deeply analyze the internal structure of credentials or the cloud provider itself.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

What is not processed when running a terraform refresh?

Options

  • AState file
  • BConfiguration file
  • CCredentials
  • DCloud provider

How the community answered

(48 responses)
  • A
    15% (7)
  • B
    10% (5)
  • C
    75% (36)

Why each option

When `terraform refresh` (or the refresh phase of `plan`/`apply`) runs, it reads the configuration and state to query the cloud provider, updating the state, but it does not intrinsically modify or deeply analyze the internal structure of credentials or the cloud provider itself.

AState file

The state file is actively read, compared against the real infrastructure, and then updated with any detected drift, meaning it is fundamentally 'processed' by `terraform refresh`.

BConfiguration file

The configuration file is parsed and evaluated by Terraform to understand the desired state and the resources it should be managing in the cloud, making it a critical component that is 'processed'.

CCredentialsCorrect

While `terraform refresh` uses credentials to authenticate with the cloud provider, the credentials themselves are not 'processed' in the sense of being read, modified, or analyzed by Terraform's refresh logic; they are simply passed for authentication.

DCloud providerCorrect

The cloud provider is interacted with to query resource states, but Terraform does not 'process' the cloud provider's internal systems or configurations; it merely sends API requests and receives responses about resource status.

Concept tested: Terraform refresh operation scope

Topics

#terraform refresh#CLI commands#state management#resource reconciliation

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice