From 2754691d2e6d07142301ec3a20aea75b60b847b5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 20 Apr 2016 17:36:16 -0700 Subject: [PATCH] providers/aws: nat gateway fixes for id only refresh --- builtin/providers/aws/resource_aws_nat_gateway.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_nat_gateway.go b/builtin/providers/aws/resource_aws_nat_gateway.go index c8c46ff32..c57fb9f64 100644 --- a/builtin/providers/aws/resource_aws_nat_gateway.go +++ b/builtin/providers/aws/resource_aws_nat_gateway.go @@ -106,7 +106,11 @@ func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error { // Set NAT Gateway attributes ng := ngRaw.(*ec2.NatGateway) + d.Set("subnet_id", ng.SubnetId) + + // Address address := ng.NatGatewayAddresses[0] + d.Set("allocation_id", address.AllocationId) d.Set("network_interface_id", address.NetworkInterfaceId) d.Set("private_ip", address.PrivateIp) d.Set("public_ip", address.PublicIp)