Skip to content

Commit

Permalink
Revert "Added data source google kms secret asymmetric (#4609)" (#4651)…
Browse files Browse the repository at this point in the history
… (#8828)

This reverts commit d332482.

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 2, 2021
1 parent e40b98b commit 36ededf
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 470 deletions.
3 changes: 3 additions & 0 deletions .changelog/4651.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
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
141 changes: 0 additions & 141 deletions google/data_source_google_kms_secret_asymmetric.go

This file was deleted.

153 changes: 0 additions & 153 deletions google/data_source_google_kms_secret_asymmetric_test.go

This file was deleted.

1 change: 0 additions & 1 deletion google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ func Provider() *schema.Provider {
"google_kms_key_ring": dataSourceGoogleKmsKeyRing(),
"google_kms_secret": dataSourceGoogleKmsSecret(),
"google_kms_secret_ciphertext": dataSourceGoogleKmsSecretCiphertext(),
"google_kms_secret_asymmetric": dataSourceGoogleKmsSecretAsymmetric(),
"google_folder": dataSourceGoogleFolder(),
"google_folder_organization_policy": dataSourceGoogleFolderOrganizationPolicy(),
"google_monitoring_notification_channel": dataSourceMonitoringNotificationChannel(),
Expand Down
Loading

0 comments on commit 36ededf

Please sign in to comment.