website: Label backend data source examples as "data source configuration"

"Example referencing" was ambiguous and confusing, especially since these
sections don't show how to reference an output in an expression.
pull/23481/head^2
Nick Fagerlund 6 years ago committed by Nick Fagerlund
parent bf65b516c0
commit 758bf8500c

@ -33,7 +33,7 @@ terraform {
}
```
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -77,7 +77,7 @@ terraform {
-> **NOTE:** When using a Service Principal or an Access Key - we recommend using a [Partial Configuration](/docs/backends/config.html) for the credentials.
## Example Referencing
## Data Source Configuration
When authenticating using a Service Principal:

@ -29,7 +29,7 @@ terraform {
Note that for the access credentials we recommend using a
[partial configuration](/docs/backends/config.html).
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -31,9 +31,9 @@ terraform {
This assumes we have a [COS Bucket](https://www.terraform.io/docs/providers/tencentcloud/r/cos_bucket.html) created named `bucket-for-terraform-state-1258798060`,
Terraform state will be written into the file `terraform/state/terraform.tfstate`.
## Using the COS remote state
## Data Source Configuration
To make use of the COS remote state we can use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html).
To make use of the COS remote state in another configuration, use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html).
```hcl
data "terraform_remote_state" "foo" {

@ -23,7 +23,7 @@ terraform {
}
```
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -29,7 +29,7 @@ terraform {
Note that for the access credentials we recommend using a
[partial configuration](/docs/backends/config.html).
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -28,7 +28,7 @@ terraform {
}
```
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -30,7 +30,7 @@ terraform {
}
```
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -23,7 +23,7 @@ terraform {
}
```
## Example Reference
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -26,7 +26,7 @@ terraform {
Note that for the access credentials we recommend using a
[partial configuration](/docs/backends/config.html).
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -42,9 +42,9 @@ a [OTS TableStore](https://www.terraform.io/docs/providers/alicloud/r/ots_table.
Terraform state will be written into the file `path/mystate/version-1.tfstate`. The `TableStore` must have a primary key of type `string`.
## Using the OSS remote state
## Data Source Configuration
To make use of the OSS remote state we can use the
To make use of the OSS remote state in another configuration, use the
[`terraform_remote_state` data
source](/docs/providers/terraform/d/remote_state.html).

@ -52,9 +52,9 @@ To use a Postgres server running on the same machine as Terraform, configure loc
terraform init -backend-config="conn_str=postgres://localhost/terraform_backend?sslmode=disable"
```
## Example Referencing
## Data Source Configuration
To make use of the pg remote state we can use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html).
To make use of the pg remote state in another configuration, use the [`terraform_remote_state` data source](/docs/providers/terraform/d/remote_state.html).
```hcl
data "terraform_remote_state" "network" {

@ -91,7 +91,7 @@ set or requires a specific version of Terraform for remote operations, we
recommend that you create your remote workspaces on Terraform Cloud before
running any remote operations against them.
## Example Configurations and References
## Example Configurations
-> **Note:** We recommend omitting the token from the configuration, and instead using
[`terraform login`](/docs/commands/login.html) or manually configuring
@ -151,7 +151,7 @@ Running `terraform init` with the backend file:
terraform init -backend-config=backend.hcl
```
### Example Reference
### Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -102,9 +102,9 @@ This is seen in the following AWS IAM Statement:
}
```
## Using the S3 remote state
## Data Source Configuration
To make use of the S3 remote state we can use the
To make use of the S3 remote state in another configuration, use the
[`terraform_remote_state` data
source](/docs/providers/terraform/d/remote_state.html).

@ -29,7 +29,7 @@ This will create a container called `terraform-state` and an object within that
For the access credentials we recommend using a
[partial configuration](/docs/backends/config.html).
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

@ -42,7 +42,7 @@ terraform {
We recommend using a [partial configuration](/docs/backends/config.html) and
omitting the access token, which can be provided as an environment variable.
## Example Referencing
## Data Source Configuration
```hcl
data "terraform_remote_state" "foo" {

Loading…
Cancel
Save