Skip to content

Commit d6067d1

Browse files
modular-magicianScottSuarez
authored andcommitted
Revert "Added data source google kms secret asymmetric (#4609)" (#4651) (#3111)
This reverts commit d332482c258b3d5a697457a8adb49031f32cd20c. Signed-off-by: Modular Magician <[email protected]>
1 parent 6918c8e commit d6067d1

File tree

7 files changed

+3
-470
lines changed

7 files changed

+3
-470
lines changed

.changelog/4651.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/config.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"log"
77
"net/http"
8-
"net/url"
98
"regexp"
109
"strings"
1110
"time"
@@ -14,7 +13,6 @@ import (
1413
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
1514
"google.golang.org/api/option"
1615

17-
kms "cloud.google.com/go/kms/apiv1"
1816
dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
1917
eventarcDcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/eventarc/beta"
2018
"golang.org/x/oauth2"
@@ -453,26 +451,6 @@ func (c *Config) NewKmsClient(userAgent string) *cloudkms.Service {
453451
return clientKms
454452
}
455453

456-
func (c *Config) NewKeyManagementClient(ctx context.Context, userAgent string) *kms.KeyManagementClient {
457-
u, err := url.Parse(c.KMSBasePath)
458-
if err != nil {
459-
log.Printf("[WARN] Error creating client kms invalid base path url %s, %s", c.KMSBasePath, err)
460-
return nil
461-
}
462-
endpoint := u.Host
463-
if u.Port() == "" {
464-
endpoint = fmt.Sprintf("%s:443", u.Host)
465-
}
466-
467-
log.Printf("[INFO] Instantiating Google Cloud KMS client for path on endpoint %s", endpoint)
468-
clientKms, err := kms.NewKeyManagementClient(ctx, option.WithUserAgent(userAgent), option.WithEndpoint(endpoint))
469-
if err != nil {
470-
log.Printf("[WARN] Error creating client kms: %s", err)
471-
return nil
472-
}
473-
return clientKms
474-
}
475-
476454
func (c *Config) NewLoggingClient(userAgent string) *cloudlogging.Service {
477455
loggingClientBasePath := removeBasePathVersion(c.LoggingBasePath)
478456
log.Printf("[INFO] Instantiating Google Stackdriver Logging client for path %s", loggingClientBasePath)

google-beta/data_source_google_kms_secret_asymmetric.go

Lines changed: 0 additions & 141 deletions
This file was deleted.

google-beta/data_source_google_kms_secret_asymmetric_test.go

Lines changed: 0 additions & 153 deletions
This file was deleted.

google-beta/provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ func Provider() *schema.Provider {
797797
"google_kms_key_ring": dataSourceGoogleKmsKeyRing(),
798798
"google_kms_secret": dataSourceGoogleKmsSecret(),
799799
"google_kms_secret_ciphertext": dataSourceGoogleKmsSecretCiphertext(),
800-
"google_kms_secret_asymmetric": dataSourceGoogleKmsSecretAsymmetric(),
801800
"google_firebase_web_app": dataSourceGoogleFirebaseWebApp(),
802801
"google_firebase_web_app_config": dataSourceGoogleFirebaseWebappConfig(),
803802
"google_folder": dataSourceGoogleFolder(),

0 commit comments

Comments
 (0)