docs: Differentiate 0.11/0.12 in terraform_remote_state
This commit is contained in:
parent
2b726a892f
commit
142ecfefe0
|
@ -29,10 +29,17 @@ data "terraform_remote_state" "vpc" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Terraform >= 0.12
|
||||||
resource "aws_instance" "foo" {
|
resource "aws_instance" "foo" {
|
||||||
# ...
|
# ...
|
||||||
subnet_id = "${data.terraform_remote_state.vpc.outputs.subnet_id}"
|
subnet_id = "${data.terraform_remote_state.vpc.outputs.subnet_id}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Terraform <= 0.11
|
||||||
|
resource "aws_instance" "foo" {
|
||||||
|
# ...
|
||||||
|
subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
@ -54,7 +61,9 @@ The following arguments are supported:
|
||||||
|
|
||||||
In addition to the above, the following attributes are exported:
|
In addition to the above, the following attributes are exported:
|
||||||
|
|
||||||
* `outputs` - Each root-level [output](/docs/configuration/outputs.html)
|
* (v0.12+) `outputs` - Each root-level [output](/docs/configuration/outputs.html)
|
||||||
|
in the remote state appears as a top level attribute on the data source.
|
||||||
|
* (<= v0.11) `<OUTPUT NAME>` - Each root-level [output](/docs/configuration/outputs.html)
|
||||||
in the remote state appears as a top level attribute on the data source.
|
in the remote state appears as a top level attribute on the data source.
|
||||||
|
|
||||||
## Root Outputs Only
|
## Root Outputs Only
|
||||||
|
|
Loading…
Reference in New Issue