diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/states/statefile/write.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/states/statefile/write.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/states/statefile/write.go b/vendor/github.com/hashicorp/terraform/states/statefile/write.go new file mode 100644 index 0000000..548ba8a --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/states/statefile/write.go | |||
@@ -0,0 +1,17 @@ | |||
1 | package statefile | ||
2 | |||
3 | import ( | ||
4 | "io" | ||
5 | |||
6 | tfversion "github.com/hashicorp/terraform/version" | ||
7 | ) | ||
8 | |||
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 | ||
14 | |||
15 | diags := writeStateV4(s, w) | ||
16 | return diags.Err() | ||
17 | } | ||