providers/aws/aws_instance: add availability_zone to state

This commit is contained in:
Mitchell Hashimoto 2014-07-14 13:30:01 -07:00
parent f8b974c9aa
commit 7a1c40855e
1 changed files with 2 additions and 0 deletions

View File

@ -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