github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/states/statemgr/doc.go (about)

     1  // Package statemgr defines the interfaces and some supporting functionality
     2  // for "state managers", which are components responsible for writing state
     3  // to some persistent storage and then later retrieving it.
     4  //
     5  // State managers will usually (but not necessarily) use the state file formats
     6  // implemented in the sibling directory "statefile" to serialize the persistent
     7  // parts of state for storage.
     8  //
     9  // State managers are responsible for ensuring that stored state can be updated
    10  // safely across multiple, possibly-concurrent Terraform runs (with reasonable
    11  // constraints and limitations). The rest of Terraform considers state to be
    12  // a mutable data structure, with state managers preserving that illusion
    13  // by creating snapshots of the state and updating them over time.
    14  //
    15  // From the perspective of callers of the general state manager API, a state
    16  // manager is able to return the latest snapshot and to replace that snapshot
    17  // with a new one. Some state managers may also preserve historical snapshots
    18  // using facilities offered by their storage backend, but this is always an
    19  // implementation detail: the historical versions are not visible to a user
    20  // of these interfaces.
    21  package statemgr