From 7a1c40855ea8f6bb2be48c856b2be66aebcf483f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 14 Jul 2014 13:30:01 -0700 Subject: [PATCH] providers/aws/aws_instance: add availability_zone to state --- builtin/providers/aws/resource_aws_instance.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index cf40918a0..6ab161015 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -111,6 +111,7 @@ func resource_aws_instance_diff( }, ComputedAttrs: []string{ + "availability_zone", "public_dns", "public_ip", "private_dns", @@ -157,6 +158,7 @@ func resource_aws_instance_refresh( func resource_aws_instance_update_state( s *terraform.ResourceState, instance *ec2.Instance) (*terraform.ResourceState, error) { + s.Attributes["availability_zone"] = instance.AvailZone s.Attributes["public_dns"] = instance.DNSName s.Attributes["public_ip"] = instance.PublicIpAddress s.Attributes["private_dns"] = instance.PrivateDNSName