I would like to split terraform in multiple cloud workspaces. In one workspace “A” i have created AWS VPC, subnet, IGW etc. I have created another workspace “B” for a specific project to spin up some VM’s.
How do i reference the VPC id, subnet id created in workspace “A” in Workspace “B” with out copy pasting the values ?
You can use the Terraform Remote State Data stanza. This allows you to read the state of other workspaces. As long as your API key has read access to the referenced remote workspace you should be good to go.