diff --git a/docs/index.md b/docs/index.md index 912673f4..d92a5109 100644 --- a/docs/index.md +++ b/docs/index.md @@ -106,8 +106,6 @@ connection "gcp" { } ``` -**NOTE:** The `credential_file` property has been deprecated and will be removed in the next major version. Please use `credentials` instead. - ## Advanced configuration options By default, the GCP plugin uses your [Application Default Credentials](https://cloud.google.com/sdk/gcloud/reference/auth/application-default) to connect to GCP. If you have not set up ADC, simply run `gcloud auth application-default login`. This command will prompt you to log in, and then will download the application default credentials to ~/.config/gcloud/application_default_credentials.json. diff --git a/gcp/utils.go b/gcp/utils.go index 1737e7fd..383612ea 100644 --- a/gcp/utils.go +++ b/gcp/utils.go @@ -188,8 +188,6 @@ func setSessionConfig(ctx context.Context, connection *plugin.Connection) []opti gcpConfig := GetConfig(connection) opts := []option.ClientOption{} - // 'credential_file' in connection config is DEPRECATED, and will be removed in future release - // use `credentials` instead if gcpConfig.Credentials != nil { contents, err := pathOrContents(*gcpConfig.Credentials) if err != nil { @@ -420,7 +418,7 @@ var GcpFilterOperatorMap = map[string]string{ } func extractLastPartSeparatedByBackslash(ctx context.Context, d *transform.TransformData) (interface{}, error) { - data :=types.SafeString(d.Value) + data := types.SafeString(d.Value) if data == "" { return nil, nil @@ -428,5 +426,5 @@ func extractLastPartSeparatedByBackslash(ctx context.Context, d *transform.Trans splitStr := strings.Split(data, "/") - return splitStr[len(splitStr) - 1], nil -} \ No newline at end of file + return splitStr[len(splitStr)-1], nil +}