nerdexam
HashiCorp

TA-002-P · Question #130

When using remote state, state is only ever held in memory when used by Terraform.

The correct answer is B. True. When utilizing remote state, Terraform exclusively holds the state data in memory during operations and never stores it persistently on the local filesystem.

Implement and maintain state

Question

When using remote state, state is only ever held in memory when used by Terraform.

Options

  • AFalse
  • BTrue

How the community answered

(18 responses)
  • A
    11% (2)
  • B
    89% (16)

Why each option

When utilizing remote state, Terraform exclusively holds the state data in memory during operations and never stores it persistently on the local filesystem.

AFalse

This is false because the fundamental design of remote state is to centralize state management and prevent the state file from residing on local disks, enhancing security and collaboration.

BTrueCorrect

When a remote state backend is configured, Terraform fetches the state file from the remote location, loads it into memory for the duration of a command's execution, and writes any updated state back to the remote backend. The state file is not persistently stored on the local machine, only temporarily in memory.

Concept tested: Terraform remote state management

Source: https://developer.hashicorp.com/terraform/language/state/remote

Topics

#Remote State#State Management#Terraform State#Memory Usage

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice