From 14e5c2d3f2f3f4542e9a8b0ffcef57890de69c90 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Thu, 13 Oct 2016 14:01:02 +1100 Subject: [PATCH 1/2] Added 0.7 upgrade documentation for remote state references. --- .../source/upgrade-guides/0-7.html.markdown | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/website/source/upgrade-guides/0-7.html.markdown b/website/source/upgrade-guides/0-7.html.markdown index 7213d252b..d8e362fac 100644 --- a/website/source/upgrade-guides/0-7.html.markdown +++ b/website/source/upgrade-guides/0-7.html.markdown @@ -134,6 +134,34 @@ resource "aws_instance" "example" { } ``` +References to 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}" + # ... +} +``` + ## Migrating to native lists and maps From 52a4086a60217260b325904f66e35d17569d304c Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Thu, 13 Oct 2016 14:10:32 +1100 Subject: [PATCH 2/2] Fixed grammatical error. --- website/source/upgrade-guides/0-7.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/upgrade-guides/0-7.html.markdown b/website/source/upgrade-guides/0-7.html.markdown index d8e362fac..e70ff382e 100644 --- a/website/source/upgrade-guides/0-7.html.markdown +++ b/website/source/upgrade-guides/0-7.html.markdown @@ -134,7 +134,7 @@ resource "aws_instance" "example" { } ``` -References to remote state outputs has also changed, the `.output` keyword is no longer required. +Referencing remote state outputs has also changed. The `.output` keyword is no longer required. For example, a config like this: