From bd2fe4d145572cc9a326aa69bfe48a817f072ff9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 13 Jul 2014 11:16:59 -0700 Subject: [PATCH] providers/aws: return proper internet gateway when attach fails --- builtin/providers/aws/resource_aws_internet_gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_internet_gateway.go b/builtin/providers/aws/resource_aws_internet_gateway.go index 3c6e7a436..a21f86d6f 100644 --- a/builtin/providers/aws/resource_aws_internet_gateway.go +++ b/builtin/providers/aws/resource_aws_internet_gateway.go @@ -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