How do I generate a dependancy map of my terraform_remote_state imports?

I use terraform_remote_state heavily- plan on using run triggers at some point too

But Im finding it has a pretty serious flaw. Im doing a 0.14 upgrade and guess what 0.12 can’t read 0.14 remote state. This is going to trigger a cascade of upgrades and force me to upgrade all my workspaces sooner than I wanted.

Kind of a different issue, but if I could at least generate a map of the dependancies workspaces have on each other it would make planning this much easier.

Before I script out iterating through every subfolder of my terraform repo and parsing out terraform_remote_state statements is there a better way to do this? Could I parse this out of the json state files easier instead? or is there some builtin tool for this?

EDIT: I know there is the terraform graph command but thats per workspace. I want to have a graph of all workspaces inter-dependancies (remote state)

I believe that the latest versions of 0.12 and 0.13 are able to read remote state from version 0.14

good to know! that might give me some breathing room- but can an older version of 0.12 read the state of a much newer version of 0.12?

I don’t think there has ever been an issue with interoperability between state files of different patch versions of the same minor version - so all 0.12.x should work together