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
|
||||
data "terraform_remote_state" "vpc" {
|
||||
backend = "remote"
|
||||
|
||||
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.
|
||||
* `workspace` - (Optional) The Terraform workspace to use, if the backend
|
||||
supports workspaces.
|
||||
* `config` - (Optional; block) The configuration of the remote backend. The
|
||||
`config` block can use any arguments that would be valid in the equivalent
|
||||
`terraform { backend "<TYPE>" { ... } }` block. See
|
||||
* `config` - (Optional; object) The configuration of the remote backend.
|
||||
Although this argument is listed as optional, most backends require
|
||||
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)
|
||||
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.
|
||||
|
||||
## Attributes Reference
|
||||
|
|
|
@ -18,10 +18,13 @@ Use the navigation to the left to read about the available data sources.
|
|||
```hcl
|
||||
# Shared infrastructure state stored in Atlas
|
||||
data "terraform_remote_state" "vpc" {
|
||||
backend = "atlas"
|
||||
backend = "remote"
|
||||
|
||||
config {
|
||||
name = "hashicorp/vpc-prod"
|
||||
organization = "hashicorp"
|
||||
workspaces = {
|
||||
name = "vpc-prod"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue