From 8b69d24147ff6350ab21c93065bc607357bfddca Mon Sep 17 00:00:00 2001 From: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:31:52 -0500 Subject: [PATCH] Update remote state data source page --- website/docs/language/state/remote-state-data.mdx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/website/docs/language/state/remote-state-data.mdx b/website/docs/language/state/remote-state-data.mdx index 8dbda8ccb0..997d06e2db 100644 --- a/website/docs/language/state/remote-state-data.mdx +++ b/website/docs/language/state/remote-state-data.mdx @@ -13,13 +13,9 @@ The `terraform_remote_state` data source retrieves the root module output values from some other Terraform configuration, using the latest state snapshot from the remote backend. -This data source is built into Terraform, and is always available; you do not -need to require or configure a provider in order to use it. +This data source implemented by a built-in provider with the [source address](/language/providers/requirements#source-addresses) `terraform.io/builtin/terraform`. That provider does not include any other resources or data sources. Because of this, the `terraform_remote_state` data source is always available; you do not need to require or configure a provider to use it. --> **Note:** This data source is implemented by a built-in provider, whose -[source address](/language/providers/requirements#source-addresses) -is `terraform.io/builtin/terraform`. That provider does not include any other -resources or data sources. +-> **Warning:** To access remote state outputs in Terraform Cloud or Terraform Enterprise, we recommend using the [`tfe_outputs` data source](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/outputs) in the [Terraform Cloud/Enterprise Provider](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs). The `tfe_outputs` method is more secure because it does not require full access to state of a workspace to fetch the outputs. If you are using the [Terraform Cloud CLI integration](/docs/cli/cloud), you **must** use `tfe_outputs` because the integration is incompatible with `terraform_remote_state`. ## Alternative Ways to Share Data Between Configurations @@ -94,12 +90,6 @@ post-processing such as JSON decoding. You can then change that module later if you switch to a different strategy for sharing data between multiple Terraform configurations. -## Usage with Terraform Cloud/Enterprise - -When trying to access remote state outputs in Terraform Cloud/Enterprise, it is recommended to use the `tfe_outputs` data source in the [Terraform Cloud/Enterprise Provider](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs) instead of relying the `terraform_remote_state` data source. - -See the [full documentation](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/outputs) for the `tfe_outputs` data source for more details. - ## Example Usage (`remote` Backend) ```hcl