providers/aws: return proper internet gateway when attach fails

This commit is contained in:
Mitchell Hashimoto 2014-07-13 11:16:59 -07:00
parent 3af16c8faf
commit bd2fe4d145
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ func resource_aws_internet_gateway_update(
if attr, ok := d.Attributes["vpc_id"]; ok && attr.New != "" {
err := resource_aws_internet_gateway_attach(ec2conn, s, attr.New)
if err != nil {
return s, err
return rs, err
}
rs.Attributes["vpc_id"] = attr.New