Skip to content

Commit

Permalink
Remove leftover references to removed credential_file arg
Browse files Browse the repository at this point in the history
  • Loading branch information
cbruno10 committed Oct 25, 2024
1 parent 283e7db commit 6705dd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 3 additions & 5 deletions gcp/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -420,13 +418,13 @@ 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
}

splitStr := strings.Split(data, "/")

return splitStr[len(splitStr) - 1], nil
}
return splitStr[len(splitStr)-1], nil
}

0 comments on commit 6705dd2

Please sign in to comment.