nerdexam
HashiCorp

TA-002-P · Question #140

terraform state subcommands such as list are read-only commands, do read-only commands create state backup files?

The correct answer is B. No. Subcommands that are read-only (such as list) do not write any backup files since they aren't modifying the state. All terraform state subcommands that modify the state write backup files. The path of these backup file can be controlled with -backup.

Implement and maintain state

Question

terraform state subcommands such as list are read-only commands, do read-only commands create state backup files?

Options

  • AYes
  • BNo

How the community answered

(24 responses)
  • A
    13% (3)
  • B
    88% (21)

Explanation

Subcommands that are read-only (such as list) do not write any backup files since they aren't modifying the state. All terraform state subcommands that modify the state write backup files. The path of these backup file can be controlled with -backup.

Topics

#terraform state#read-only commands#state backup#CLI behavior

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice