terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

Use tfe_outputs for cross stack references when using tf cloud

Open jsteinich opened this issue 3 years ago • 1 comments

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

jsteinich avatar Feb 22 '22 03:02 jsteinich

I think this could be solved in a construct that extends the remote backend and overwrites the getRemoteStateDataSource function.

DanielMSchmidt avatar Feb 22 '22 09:02 DanielMSchmidt

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.

xiehan avatar Jun 01 '23 16:06 xiehan

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.

github-actions[bot] avatar Jul 02 '23 01:07 github-actions[bot]