From b222499ee0fd2884433df3ea934a786809f250c7 Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Wed, 10 Jun 2015 00:14:13 -0400 Subject: [PATCH 1/2] Add beta compute client --- builtin/providers/google/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/builtin/providers/google/config.go b/builtin/providers/google/config.go index 25348bbf2..0640690e9 100644 --- a/builtin/providers/google/config.go +++ b/builtin/providers/google/config.go @@ -14,6 +14,7 @@ import ( "golang.org/x/oauth2/google" "golang.org/x/oauth2/jwt" "google.golang.org/api/compute/v1" + computeBeta "google.golang.org/api/compute/v0.beta" "google.golang.org/api/dns/v1" "google.golang.org/api/storage/v1" ) @@ -26,6 +27,7 @@ type Config struct { Region string clientCompute *compute.Service + clientComputeBeta *computeBeta.Service clientDns *dns.Service clientStorage *storage.Service } @@ -110,6 +112,13 @@ func (c *Config) loadAndValidate() error { } c.clientCompute.UserAgent = userAgent + log.Printf("[INFO] Instantiating Beta GCE client...") + c.clientComputeBeta, err = computeBeta.New(client) + if err != nil { + return err + } + c.clientComputeBeta.UserAgent = userAgent + log.Printf("[INFO] Instantiating Google Cloud DNS client...") c.clientDns, err = dns.New(client) if err != nil { From 02e3d30aac9cda7bef47477d7484e1c35c86f38f Mon Sep 17 00:00:00 2001 From: Michael Chapman Date: Wed, 10 Jun 2015 14:50:32 +1000 Subject: [PATCH 2/2] Correct syntax error in group membership test. Fixes #2300. Regression in 4d59019288f2c2a3bd519728ba841eec7f4e6e59 --- builtin/providers/aws/resource_aws_iam_group_membership_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_iam_group_membership_test.go b/builtin/providers/aws/resource_aws_iam_group_membership_test.go index 211ceebd4..fc868cb7c 100644 --- a/builtin/providers/aws/resource_aws_iam_group_membership_test.go +++ b/builtin/providers/aws/resource_aws_iam_group_membership_test.go @@ -59,7 +59,7 @@ func testAccCheckAWSGroupMembershipDestroy(s *terraform.State) error { for _, u := range resp.Users { for _, i := range users { if i == *u.UserName { - return fmt.Errorf("Error: User (s) still a member of Group (%s)", i, *resp.Group.GroupName) + return fmt.Errorf("Error: User (%s) still a member of Group (%s)", i, *resp.Group.GroupName) } } }