From 14e5c2d3f2f3f4542e9a8b0ffcef57890de69c90 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Thu, 13 Oct 2016 14:01:02 +1100 Subject: [PATCH] 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 7213d252ba..d8e362faca 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