github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/states/statefile/file.go (about) 1 package statefile 2 3 import ( 4 version "github.com/hashicorp/go-version" 5 6 "github.com/hashicorp/terraform-plugin-sdk/internal/states" 7 ) 8 9 // File is the in-memory representation of a state file. It includes the state 10 // itself along with various metadata used to track changing state files for 11 // the same configuration over time. 12 type File struct { 13 // TerraformVersion is the version of Terraform that wrote this state file. 14 TerraformVersion *version.Version 15 16 // Serial is incremented on any operation that modifies 17 // the State file. It is used to detect potentially conflicting 18 // updates. 19 Serial uint64 20 21 // Lineage is set when a new, blank state file is created and then 22 // never updated. This allows us to determine whether the serials 23 // of two states can be meaningfully compared. 24 // Apart from the guarantee that collisions between two lineages 25 // are very unlikely, this value is opaque and external callers 26 // should only compare lineage strings byte-for-byte for equality. 27 Lineage string 28 29 // State is the actual state represented by this file. 30 State *states.State 31 }