Skip to content

Commit

Permalink
use v1
Browse files Browse the repository at this point in the history
  • Loading branch information
emilymye committed Jun 13, 2019
1 parent e62f8a9 commit 87c5f30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/hashicorp/terraform/helper/schema"
"google.golang.org/api/servicenetworking/v1beta"
"google.golang.org/api/servicenetworking/v1"
)

func resourceServiceNetworkingConnection() *schema.Resource {
Expand Down
8 changes: 1 addition & 7 deletions third_party/terraform/utils/config.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ import (
"google.golang.org/api/pubsub/v1"
"google.golang.org/api/runtimeconfig/v1beta1"
"google.golang.org/api/servicemanagement/v1"
<% unless version == 'ga' -%>
"google.golang.org/api/servicenetworking/v1beta"
<% end -%>
"google.golang.org/api/servicenetworking/v1"
"google.golang.org/api/serviceusage/v1"
"google.golang.org/api/sourcerepo/v1"
"google.golang.org/api/spanner/v1"
Expand Down Expand Up @@ -105,9 +103,7 @@ type Config struct {
clientCloudFunctions *cloudfunctions.Service
clientCloudIoT *cloudiot.Service
clientAppEngine *appengine.APIService
<% unless version == 'ga' -%>
clientServiceNetworking *servicenetworking.APIService
<% end -%>
clientStorageTransfer *storagetransfer.Service

bigtableClientFactory *BigtableClientFactory
Expand Down Expand Up @@ -383,14 +379,12 @@ func (c *Config) LoadAndValidate() error {
}
c.clientComposer.UserAgent = userAgent

<% unless version == 'ga' -%>
log.Printf("[INFO] Instantiating Service Networking Client...")
c.clientServiceNetworking, err = servicenetworking.NewService(context, option.WithHTTPClient(client))
if err != nil {
return err
}
c.clientServiceNetworking.UserAgent = userAgent
<% end -%>

log.Printf("[INFO] Instantiating Google Cloud Storage Transfer Client...")
c.clientStorageTransfer, err = storagetransfer.NewService(context, option.WithHTTPClient(client))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package google

import (
"github.com/hashicorp/terraform/helper/resource"
"google.golang.org/api/servicenetworking/v1beta"
"google.golang.org/api/servicenetworking/v1"
)

type ServiceNetworkingOperationWaiter struct {
Expand Down

0 comments on commit 87c5f30

Please sign in to comment.