aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index 59731a858..c940bdeaf 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -53,6 +53,11 @@ func NewContext() (*Context, error) {
return nil, fmt.Errorf("failed to get a token source: %v", err)
}
httpClient := oauth2.NewClient(background, tokenSource)
+ // nolint
+ // compute.New is deprecated: please use NewService instead.
+ // To provide a custom HTTP client, use option.WithHTTPClient.
+ // If you are using google.golang.org/api/googleapis/transport.APIKey,
+ // use option.WithAPIKey with NewService instead.
ctx.computeService, _ = compute.New(httpClient)
// Obtain project name, zone and current instance IP address.
ctx.ProjectID, err = ctx.getMeta("project/project-id")