Versions in this module Expand all Collapse all v1 v1.4.0 Mar 10, 2023 Changes in this version + func CheckValidImport(newFile, existingFile *statefile.File) error + func Export(mgr Reader) *statefile.File + func Import(f *statefile.File, mgr Transient, force bool) error + func LockWithContext(ctx context.Context, s Locker, info *LockInfo) (string, error) + func Migrate(dst, src Transient) error + func NewLineage() string + func NewStateFile() *statefile.File + func PlannedStateUpdate(mgr Transient, planned *states.State) *statefile.File + func RefreshAndRead(mgr Storage) (*states.State, error) + func TestFull(t *testing.T, s Full) + func TestFullInitialState() *states.State + func WriteAndPersist(mgr Storage, state *states.State, schemas *terraform.Schemas) error + func WritePlannedStateUpdate(mgr Transient, planned *statefile.File) error + type Filesystem struct + func NewFilesystem(statePath string) *Filesystem + func NewFilesystemBetweenPaths(readPath, writePath string) *Filesystem + func (s *Filesystem) BackupPath() string + func (s *Filesystem) GetRootOutputValues() (map[string]*states.OutputValue, error) + func (s *Filesystem) Lock(info *LockInfo) (string, error) + func (s *Filesystem) PersistState(schemas *terraform.Schemas) error + func (s *Filesystem) RefreshState() error + func (s *Filesystem) SetBackupPath(path string) + func (s *Filesystem) State() *states.State + func (s *Filesystem) StateForMigration() *statefile.File + func (s *Filesystem) StateSnapshotMeta() SnapshotMeta + func (s *Filesystem) Unlock(id string) error + func (s *Filesystem) WriteState(state *states.State) error + func (s *Filesystem) WriteStateForMigration(f *statefile.File, force bool) error + type Full interface + func NewFullFake(t Transient, initial *states.State) Full + func NewUnlockErrorFull(t Transient, initial *states.State) Full + type LockDisabled struct + Inner Full + func (s *LockDisabled) GetRootOutputValues() (map[string]*states.OutputValue, error) + func (s *LockDisabled) Lock(info *LockInfo) (string, error) + func (s *LockDisabled) PersistState(schemas *terraform.Schemas) error + func (s *LockDisabled) RefreshState() error + func (s *LockDisabled) State() *states.State + func (s *LockDisabled) Unlock(id string) error + func (s *LockDisabled) WriteState(v *states.State) error + type LockError struct + Err error + Info *LockInfo + func (e *LockError) Error() string + type LockInfo struct + Created time.Time + ID string + Info string + Operation string + Path string + Version string + Who string + func NewLockInfo() *LockInfo + func (l *LockInfo) Err() error + func (l *LockInfo) Marshal() []byte + func (l *LockInfo) String() string + type Locker interface + Lock func(info *LockInfo) (string, error) + Unlock func(id string) error + type Migrator interface + StateForMigration func() *statefile.File + WriteStateForMigration func(f *statefile.File, force bool) error + type OutputReader interface + GetRootOutputValues func() (map[string]*states.OutputValue, error) + type Persistent interface + type PersistentMeta interface + StateSnapshotMeta func() SnapshotMeta + type Persister interface + PersistState func(*terraform.Schemas) error + type Reader interface + State func() *states.State + type Refresher interface + RefreshState func() error + type SnapshotMeta struct + Lineage string + Serial uint64 + TerraformVersion *version.Version + func (m SnapshotMeta) Compare(existing SnapshotMeta) SnapshotMetaRel + type SnapshotMetaRel rune + const SnapshotEqual + const SnapshotLegacy + const SnapshotNewer + const SnapshotOlder + const SnapshotUnrelated + func (i SnapshotMetaRel) String() string + type Storage interface + type Transient interface + func NewTransientInMemory(initial *states.State) Transient + type Writer interface + WriteState func(*states.State) error