providers/aws: nat gateway fixes for id only refresh

This commit is contained in:
Mitchell Hashimoto 2016-04-20 17:36:16 -07:00
parent 10e4147d00
commit 2754691d2e
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 4 additions and 0 deletions

View File

@ -106,7 +106,11 @@ func resourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error {
// Set NAT Gateway attributes // Set NAT Gateway attributes
ng := ngRaw.(*ec2.NatGateway) ng := ngRaw.(*ec2.NatGateway)
d.Set("subnet_id", ng.SubnetId)
// Address
address := ng.NatGatewayAddresses[0] address := ng.NatGatewayAddresses[0]
d.Set("allocation_id", address.AllocationId)
d.Set("network_interface_id", address.NetworkInterfaceId) d.Set("network_interface_id", address.NetworkInterfaceId)
d.Set("private_ip", address.PrivateIp) d.Set("private_ip", address.PrivateIp)
d.Set("public_ip", address.PublicIp) d.Set("public_ip", address.PublicIp)