Fix NAT find based on #4572

This commit is contained in:
Mike Splain 2018-03-08 11:14:34 -05:00
parent 7bd39bd9e7
commit 4bd5797bb1
1 changed files with 5 additions and 2 deletions

View File

@ -110,10 +110,13 @@ func (e *NatGateway) Find(c *fi.Context) (*NatGateway, error) {
return nil, fmt.Errorf("found multiple elastic IPs attached to NatGateway %q", aws.StringValue(ngw.NatGatewayId))
}
// NATGateways don't have a Name (no tags), so we set the name to avoid spurious changes
actual.Name = e.Name
// NATGateways now have names and tags so lets pull from there instead.
actual.Name = findNameTag(ngw.Tags)
actual.Tags = intersectTags(ngw.Tags, e.Tags)
actual.Lifecycle = e.Lifecycle
actual.Shared = e.Shared
actual.AssociatedRouteTable = e.AssociatedRouteTable
e.ID = actual.ID