Skip to content

Commit

Permalink
Remove support for GCP auth via env vars (closes #181)
Browse files Browse the repository at this point in the history
  • Loading branch information
colmsnowplow committed Aug 1, 2022
1 parent 1828c67 commit 00679c7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ package cmd
import (
"encoding/json"
"fmt"
"os"

"github.com/getsentry/sentry-go"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
sentryhook "github.com/snowplow-devops/go-sentryhook"

config "github.com/snowplow-devops/stream-replicator/config"
"github.com/snowplow-devops/stream-replicator/pkg/common"
)

var (
Expand All @@ -43,15 +41,6 @@ func Init() (*config.Config, bool, error) {
return nil, false, errors.Wrap(err, "Failed to build config")
}

// Configure GCP Access (if set)
if cfg.Data.GoogleServiceAccountB64 != "" {
targetFile, err := common.GetGCPServiceAccountFromBase64(cfg.Data.GoogleServiceAccountB64)
if err != nil {
return nil, false, errors.Wrap(err, "Failed to store GCP Service Account JSON file")
}
os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", targetFile)
}

// Configure Sentry
sentryEnabled := cfg.Data.Sentry.Dsn != ""
if sentryEnabled {
Expand Down

0 comments on commit 00679c7

Please sign in to comment.