Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Added data source google kms secret asymmetric" #671

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"net/http"
"net/url"
"regexp"
"strings"
"time"
Expand All @@ -14,7 +13,6 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
"google.golang.org/api/option"

kms "cloud.google.com/go/kms/apiv1"
"golang.org/x/oauth2"
googleoauth "golang.org/x/oauth2/google"
appengine "google.golang.org/api/appengine/v1"
Expand Down Expand Up @@ -418,26 +416,6 @@ func (c *Config) NewKmsClient(userAgent string) *cloudkms.Service {
return clientKms
}

func (c *Config) NewKeyManagementClient(ctx context.Context, userAgent string) *kms.KeyManagementClient {
u, err := url.Parse(c.KMSBasePath)
if err != nil {
log.Printf("[WARN] Error creating client kms invalid base path url %s, %s", c.KMSBasePath, err)
return nil
}
endpoint := u.Host
if u.Port() == "" {
endpoint = fmt.Sprintf("%s:443", u.Host)
}

log.Printf("[INFO] Instantiating Google Cloud KMS client for path on endpoint %s", endpoint)
clientKms, err := kms.NewKeyManagementClient(ctx, option.WithUserAgent(userAgent), option.WithEndpoint(endpoint))
if err != nil {
log.Printf("[WARN] Error creating client kms: %s", err)
return nil
}
return clientKms
}

func (c *Config) NewLoggingClient(userAgent string) *cloudlogging.Service {
loggingClientBasePath := removeBasePathVersion(c.LoggingBasePath)
log.Printf("[INFO] Instantiating Google Stackdriver Logging client for path %s", loggingClientBasePath)
Expand Down