mirror of https://github.com/hashicorp/terraform
command/show: differentiate between state schemas and plan schemas. (#20516)
When a planfile is supplied to the `terraform show -json` command, the context that loads only included schemas for resources in the plan. We found an edge case where removing a data source from the configuration (though only if there are no managed resources from the same provider) would cause jsonstate.Marshal to fail because the provider schema wasn't in the plan context. jsonplan.Marshal now takes two schemas, one for plan and one for state. If the state schema is nil it will simply use the plan schemas.pull/20553/head
parent
c4151b7c7c
commit
8fb4e5ce6e
Loading…
Reference in new issue