state backup
A saved copy of the state from before a change, kept so you can recover if the state is damaged or a repair goes wrong.
In more detail
Local state writes terraform.tfstate.backup automatically; remote backends rely on versioned storage instead. Always take a copy before any manual state repair or migration.
Related terms
- Terraform state — Terraform's record, usually a JSON file called terraform.tfstate, mapping each resource in the configuration to the real object it created.
- object storage — Cloud storage that keeps whole files, called objects, in buckets and serves them over the network, such as Amazon S3.
- terraform init -migrate-state — The init option that copies existing state from the old backend into a newly configured one.
Taught in
- What State Really Is And Why It Is Needed — Infrastructure as Code with Terraform
- Simulating A Managed Database — Infrastructure as Code with Terraform
- Detecting And Fixing Configuration Drift — Infrastructure as Code with Terraform
- Importing Existing Resources — Infrastructure as Code with Terraform
- Forcing Replacement — Infrastructure as Code with Terraform
- The Problem With Local State — Infrastructure as Code with Terraform
- Configuring A Remote Backend — Infrastructure as Code with Terraform
- State Locking With Use Lockfile — Infrastructure as Code with Terraform
- Workspaces For Multiple Environments — Infrastructure as Code with Terraform
- Security: Secrets In State And Ephemeral Values — Infrastructure as Code with Terraform