Terraform state Flashcards
What is a backend?
A “backend” in Terraform determines how state is loaded and how an operation such as apply is executed.
Local backend
The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.
Default path for local backend
terraform.tfstate
state locking
If supported by your backend, Terraform will lock your state for all operations that could write state.
remote backends
Remote backends allow Terraform to use a shared storage space for state data, so any member of your team can use Terraform to manage the same infrastructure.
refresh
The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure.