Nothing is returned when trying to output a state file in another directory


I’m trying to show the state of a Terraform plan, but when I pass in a file the state is always empty -


For example, I have the the following directories, and I run terraform apply from each.

  • /home/me/inf/inf-one
  • /home/me/inf/inf-two
  • /home/me/inf/inf-three

If I change to any of those directories and run terraform show -json, the state is output as expected.

However, if I change to /home/me/inf to run the show sub-command, an pass it a tfstate file, the output is empty (with the only output as described above).

terraform show -json ./inf-one/.terraform/terraform.tfstate

Am I missing something here?


Is this forum active?