I’m opening this for discussion here, because–as a GitHub issue–hashibot would probably auto-close it.
I’m reading through the terraform docs here: https://www.terraform.io/docs/state/index.html#inspection-and-modification
And they state the following:
The CLI usage and output of the state commands is structured to be friendly for Unix tools such as grep, awk, etc. Additionally, the CLI insulates users from any format changes within the state itself. The Terraform project will keep the CLI working while the state format underneath it may shift.
The state is in JSON format and Terraform will promise backwards compatibility with the state file. The JSON format makes it easy to write tools around the state if you want or to modify it by hand in the case of a Terraform bug. The “version” field on the state contents allows us to transparently move the format forward if we make modifications.
I understand these docs were written a long time ago by Mitchell, but are they still an accurate reflection of the terraform ethos?
What do these docs mean in practice?
For example, if I’ve built automation around the terraform state that is stored remotely, can I count on it to maintain reverse compatibility when I upgrade to terraform 0.12 from 0.11.13? This is mostly a rhetorical question, because I know the format changed in some ways that weren’t reverse compatible.
For example, in https://github.com/hashicorp/terraform/pull/18223, this occurred:
Only the root module outputs are persisted, with child module outputs discarded.
Should the docs be updated?