Merge pull request #9348 from nicksantamaria/upgrade-docs-07-remote-state

Added 0.7 upgrade documentation for remote state references.
This commit is contained in:
James Nugent 2016-10-13 12:49:55 -05:00 committed by GitHub
commit cdddc3774a
1 changed files with 28 additions and 0 deletions

View File

@ -134,6 +134,34 @@ resource "aws_instance" "example" {
}
```
Referencing remote state outputs has also changed. The `.output` keyword is no longer required.
For example, a config like this:
```
resource "terraform_remote_state" "example" {
# ...
}
resource "aws_instance" "example" {
ami = "${terraform_remote_state.example.output.ami_id}"
# ...
}
```
Would now look like this:
```
data "terraform_remote_state" "example" {
# ...
}
resource "aws_instance" "example" {
ami = "${data.terraform_remote_state.example.ami_id}"
# ...
}
```
<a id="listmap"></a>
## Migrating to native lists and maps