SIGN IN SIGN UP
hashicorp / terraform UNCLAIMED

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

0 0 32 Go

fix: Make sure the backend state file is valid if a user introduces PSS to a pre-existing project via `init -reconfigure`.

The -reconfigure flag makes Terraform ignore the backend state file when deciding what scenario is happening, which leads to Terraform acting like it's initialising a working dir for the first time. However downstream code then needs to be prepared for both of these scenarios:
- The work dir has never been initialised before and the backend state file doesn't exist yet
- The work dir has been used before but Terraform is being forced to treat it as new.

This change helps with the second point - we need to remove any old descriptions of a Backend to avoid a situation where the backend state file describes both a backend and state_store.
S
Sarah French committed
a2ad11c4f14ceea1e81c81a56c44428fc4110f20
Parent: c78b2c2
Committed by Sarah French <15078782+SarahFrench@users.noreply.github.com> on 5/23/2026, 5:39:35 PM