nerdexam
HashiCorp

TA-002-P · Question #136

Which of the following best describes the default local backend?

The correct answer is B. The local backend stores state on the local filesystem, locks the state using system APIs. The local backend is Terraform's default. It stores the state file (terraform.tfstate) on the local filesystem in the working directory, uses OS-level file locking (via system APIs) to prevent concurrent state modifications, and performs operations locally on the machine…

Implement and maintain state

Question

Which of the following best describes the default local backend?

Options

  • AThe local backend is where Terraform Enterprise stores logs to be processed by an log
  • BThe local backend stores state on the local filesystem, locks the state using system APIs,
  • CThe local backend is the directory where resources deployed by Terraform have direct
  • DThe local backend is how Terraform connects to public cloud services, such as AWS,

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    88% (35)
  • C
    8% (3)
  • D
    3% (1)

Explanation

The local backend is Terraform's default. It stores the state file (terraform.tfstate) on the local filesystem in the working directory, uses OS-level file locking (via system APIs) to prevent concurrent state modifications, and performs operations locally on the machine running Terraform. Option A describes log processing in Terraform Enterprise. Option C incorrectly describes direct resource access. Option D incorrectly describes how Terraform connects to cloud providers (that is the role of providers, not backends). The local backend is simple but not suitable for team collaboration since the state is not shared.

Topics

#Terraform state#Local backend#State locking#Filesystem storage

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice