Use tfe_outputs for cross stack references when using tf cloud
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
The Terraform documentation recommends using tfe_outputs rather than terraform_remote_state when accessing outputs from TF Cloud workspaces.
References
- https://www.terraform.io/language/state/remote-state-data
- https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/outputs
I think this could be solved in a construct that extends the remote backend and overwrites the getRemoteStateDataSource function.
We talked about this while we were working on the 0.15 release and the challenge is that we're not sure whether baking in a dependency on the TFE provider is the right solution either. I'm going to close this for now but we can always revisit later this year when we do some more work related to TFC.
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.