terraform/command/jsonstate
James Bardin 3449a8aa35 don't marshal state with the wrong schema
Instead of returning an error with no context about unexpected
attributes or incorrect types, notify users that the schema stored in
the state does not match the current provider.

User can only encounter this error if the providers have updated their
schemas since the state was stored. This would appears when running
`terraform show -json` to display the current state, or
`terraform show -json planfile` if that plan was created with
`-refresh=false`. In either case, the state must be refreshed in order
to properly json encoded.
2021-02-23 10:19:24 -05:00
..
doc.go command/jsonstate: marshal state into a machine readable blob o'json (#19911) 2019-01-03 12:08:03 -08:00
state.go don't marshal state with the wrong schema 2021-02-23 10:19:24 -05:00
state_test.go don't marshal state with the wrong schema 2021-02-23 10:19:24 -05:00