Can I reference the output of a stack that's in a different space using terraform remote state or is that only possible with dependencies? Like if I have a global space that needs to reference a vpc output from my prod space.
You can access the output of a stack that's in a different space using stack dependencies (as you mentioned) - this is the recommended approach as it ensures proper execution order and state consistency. On the other hand, if you want to use the terraform remote state datasource, you can easily do that, too. What you'll need to do on the stack that shares the output is to enable the external state access option (this can be done in settings -> vendor), or if you are using our terraform provider to create Spacelift resources, you will need to enable it with "terraform_external_state_access = true" inside the stack resource.
Can I reference the output of a stack that's in a different space using terraform remote state or is that only possible with dependencies? Like if I have a global space that needs to reference a vpc output from my prod space.
You can access the output of a stack that's in a different space using stack dependencies (as you mentioned) - this is the recommended approach as it ensures proper execution order and state consistency.
On the other hand, if you want to use the terraform remote state datasource, you can easily do that, too. What you'll need to do on the stack that shares the output is to enable the external state access option (this can be done in settings -> vendor), or if you are using our terraform provider to create Spacelift resources, you will need to enable it with "terraform_external_state_access = true" inside the stack resource.