Skip to content

Commit 7689179

Browse files
Revert "A new datasource for fetching the list of alloydb supported database flags in a location. (#7377)" (#7628) (#14222)
This reverts commit 4ed506a. Signed-off-by: Modular Magician <[email protected]>
1 parent b495ed1 commit 7689179

9 files changed

+4
-361
lines changed

.changelog/7628.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module github.com/hashicorp/terraform-provider-google
22
go 1.18
33

44
require (
5-
cloud.google.com/go/alloydb v0.2.0
65
cloud.google.com/go/bigtable v1.17.0
76
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.34.0
87
github.com/apparentlymart/go-cidr v1.1.0

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
6161
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
6262
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.34.0 h1:o7t+hPFv+Ax5O2vxzIH7dEtvlWA7JJOlOd7mWFvMa6s=
6363
github.com/GoogleCloudPlatform/declarative-resource-client-library v1.34.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k=
64-
cloud.google.com/go/alloydb v0.2.0 h1:bAFRzwC4q/+eiz5FpckFbT0IZozJMTjVcrDdRCpIdJI=
65-
cloud.google.com/go/alloydb v0.2.0/go.mod h1:wZv2QDg2+hJ/V4lXsUdnSm8ygdMKBVWeioAsERSBLbE=
6664
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
6765
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
6866
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=

google/config.go

-12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/sirupsen/logrus"
2020
"google.golang.org/api/option"
2121

22-
alloydb "cloud.google.com/go/alloydb/apiv1"
2322
"golang.org/x/oauth2"
2423
googleoauth "golang.org/x/oauth2/google"
2524
appengine "google.golang.org/api/appengine/v1"
@@ -1347,17 +1346,6 @@ func (c *Config) NewSqlAdminClient(userAgent string) *sqladmin.Service {
13471346
return clientSqlAdmin
13481347
}
13491348

1350-
func (c *Config) NewAlloydbClient(userAgent string) *alloydb.AlloyDBAdminClient {
1351-
alloydbBasePath := RemoveBasePathVersion(RemoveBasePathVersion(c.AlloydbBasePath))
1352-
log.Printf("[INFO] Instantiating Alloydb client for path %s", alloydbBasePath)
1353-
clientAlloydb, err := alloydb.NewAlloyDBAdminRESTClient(c.context, option.WithHTTPClient(c.Client), option.WithUserAgent(userAgent), option.WithEndpoint(alloydbBasePath))
1354-
if err != nil {
1355-
log.Printf("[WARN] Error creating client storage: %s", err)
1356-
return nil
1357-
}
1358-
return clientAlloydb
1359-
}
1360-
13611349
func (c *Config) NewPubsubClient(userAgent string) *pubsub.Service {
13621350
pubsubClientBasePath := RemoveBasePathVersion(c.PubsubBasePath)
13631351
log.Printf("[INFO] Instantiating Google Pubsub client for path %s", pubsubClientBasePath)

google/data_source_alloydb_supported_database_flags.go

-217
This file was deleted.

google/data_source_alloydb_supported_database_flags_test.go

-75
This file was deleted.

google/data_source_sql_databases_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func checkDatabaseFieldsMatchForDataSourceStateAndResourceState(dsAttr, rsAttr m
120120
}
121121

122122
if index == "-1" {
123-
return errors.New("The newly created instance is not found in the data source")
123+
return errors.New("The newly created intance is not found in the data source")
124124
}
125125

126126
errMsg := ""

google/provider.go

-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ func Provider() *schema.Provider {
579579
"google_access_approval_organization_service_account": DataSourceAccessApprovalOrganizationServiceAccount(),
580580
"google_access_approval_project_service_account": DataSourceAccessApprovalProjectServiceAccount(),
581581
"google_active_folder": DataSourceGoogleActiveFolder(),
582-
"google_alloydb_supported_database_flags": DataSourceAlloydbSupportedDatabaseFlags(),
583582
"google_artifact_registry_repository": DataSourceArtifactRegistryRepository(),
584583
"google_app_engine_default_service_account": DataSourceGoogleAppEngineDefaultServiceAccount(),
585584
"google_beyondcorp_app_connection": DataSourceGoogleBeyondcorpAppConnection(),

0 commit comments

Comments
 (0)