6 tfversion "github.com/hashicorp/terraform/version"
9 // Write writes the given state to the given writer in the current state
10 // serialization format.
11 func Write(s *File, w io.Writer) error {
12 // Always record the current terraform version in the state.
13 s.TerraformVersion = tfversion.SemVer
15 diags := writeStateV4(s, w)