website: In 0.12, terraform_remote_state syntax differs from backend config
This commit is contained in:
parent
e1fb26de94
commit
a038f8c43b
|
@ -24,8 +24,12 @@ use interpolations when configuring them.
|
||||||
```hcl
|
```hcl
|
||||||
data "terraform_remote_state" "vpc" {
|
data "terraform_remote_state" "vpc" {
|
||||||
backend = "remote"
|
backend = "remote"
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
name = "hashicorp/vpc-prod"
|
organization = "hashicorp"
|
||||||
|
workspaces = {
|
||||||
|
name = "vpc-prod"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,12 +53,19 @@ The following arguments are supported:
|
||||||
* `backend` - (Required) The remote backend to use.
|
* `backend` - (Required) The remote backend to use.
|
||||||
* `workspace` - (Optional) The Terraform workspace to use, if the backend
|
* `workspace` - (Optional) The Terraform workspace to use, if the backend
|
||||||
supports workspaces.
|
supports workspaces.
|
||||||
* `config` - (Optional; block) The configuration of the remote backend. The
|
* `config` - (Optional; object) The configuration of the remote backend.
|
||||||
`config` block can use any arguments that would be valid in the equivalent
|
Although this argument is listed as optional, most backends require
|
||||||
`terraform { backend "<TYPE>" { ... } }` block. See
|
some configuration.
|
||||||
|
|
||||||
|
The `config` object can use any arguments that would be valid in the
|
||||||
|
equivalent `terraform { backend "<TYPE>" { ... } }` block. See
|
||||||
[the documentation of your chosen backend](/docs/backends/types/index.html)
|
[the documentation of your chosen backend](/docs/backends/types/index.html)
|
||||||
for details.
|
for details.
|
||||||
* `defaults` - (Optional; block) Default values for outputs, in case the state
|
|
||||||
|
-> **Note:** If the backend configuration requires a nested block, specify
|
||||||
|
it here as a normal attribute with an object value. (For example,
|
||||||
|
`workspaces = { ... }` instead of `workspaces { ... }`.)
|
||||||
|
* `defaults` - (Optional; object) Default values for outputs, in case the state
|
||||||
file is empty or lacks a required output.
|
file is empty or lacks a required output.
|
||||||
|
|
||||||
## Attributes Reference
|
## Attributes Reference
|
||||||
|
|
|
@ -18,10 +18,13 @@ Use the navigation to the left to read about the available data sources.
|
||||||
```hcl
|
```hcl
|
||||||
# Shared infrastructure state stored in Atlas
|
# Shared infrastructure state stored in Atlas
|
||||||
data "terraform_remote_state" "vpc" {
|
data "terraform_remote_state" "vpc" {
|
||||||
backend = "atlas"
|
backend = "remote"
|
||||||
|
|
||||||
config {
|
config {
|
||||||
name = "hashicorp/vpc-prod"
|
organization = "hashicorp"
|
||||||
|
workspaces = {
|
||||||
|
name = "vpc-prod"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue