diff --git a/.changelog/5250.txt b/.changelog/5250.txt new file mode 100644 index 0000000000..59e3e3591a --- /dev/null +++ b/.changelog/5250.txt @@ -0,0 +1,3 @@ +```release-note:breaking-change +project: removed ability to specify `bigquery-json.googleapis.com`, the provider will no longer convert it as the upstream API migration is finished. Use `bigquery.googleapis.com` instead. +``` diff --git a/google-beta/resource_gke_hub_feature_membership_test.go b/google-beta/resource_gke_hub_feature_membership_test.go index 32fa84c196..9e1f2ea64d 100644 --- a/google-beta/resource_gke_hub_feature_membership_test.go +++ b/google-beta/resource_gke_hub_feature_membership_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" + "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl" gkehub "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/gkehub/beta" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/google-beta/resource_google_project_service.go b/google-beta/resource_google_project_service.go index 4341c98a29..0c910a78fc 100644 --- a/google-beta/resource_google_project_service.go +++ b/google-beta/resource_google_project_service.go @@ -44,9 +44,7 @@ var bannedProjectServices = []string{"bigquery-json.googleapis.com"} // "DEPRECATED FOR {{version}} next to entries slated for removal in {{version}} // upon removal, we should disallow the old name from being used even if it's // not gone from the underlying API yet -var renamedServices = map[string]string{ - "bigquery-json.googleapis.com": "bigquery.googleapis.com", // DEPRECATED FOR 4.0.0. Originally for 3.0.0, but the migration did not happen server-side yet. -} +var renamedServices = map[string]string{} // renamedServices in reverse (new -> old) var renamedServicesByNewServiceNames = reverseStringMap(renamedServices) diff --git a/google-beta/resource_google_project_service_test.go b/google-beta/resource_google_project_service_test.go index 7d5719cb73..7d7a462ad7 100644 --- a/google-beta/resource_google_project_service_test.go +++ b/google-beta/resource_google_project_service_test.go @@ -176,6 +176,15 @@ func TestAccProjectService_handleNotFound(t *testing.T) { func TestAccProjectService_renamedService(t *testing.T) { t.Parallel() + if len(renamedServices) == 0 { + t.Skip() + } + + var newName string + for _, new := range renamedServices { + newName = new + } + org := getTestOrgFromEnv(t) pid := fmt.Sprintf("tf-test-%d", randInt(t)) vcrTest(t, resource.TestCase{ @@ -183,7 +192,7 @@ func TestAccProjectService_renamedService(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccProjectService_single("bigquery.googleapis.com", pid, pname, org), + Config: testAccProjectService_single(newName, pid, pname, org), }, { ResourceName: "google_project_service.test", diff --git a/website/docs/guides/version_4_upgrade.html.markdown b/website/docs/guides/version_4_upgrade.html.markdown index 05604e4390..ddb52d392d 100644 --- a/website/docs/guides/version_4_upgrade.html.markdown +++ b/website/docs/guides/version_4_upgrade.html.markdown @@ -29,6 +29,8 @@ description: |- - [`node_config.workload_metadata_config.node_metadata` is now removed](#node_configworkload_metadata_confignode_metadata-is-now-removed) - [`workload_identity_config.0.identity_namespace` is now removed](#workload_identity_config0identity_namespace-is-now-removed) - [`pod_security_policy_config` is removed from the GA provider](#pod_security_policy_config-is-removed-from-the-ga-provider) + - [Resource: `google_project_service`](#resource-google_project_service) + - [`bigquery-json.googleapis.com` is no longer a valid service name](#bigquery-json.googleapis.com-is-no-longer-a-valid-service-name) @@ -233,3 +235,11 @@ This field was incorrectly included in the GA `google` provider in past releases In order to continue to use the feature, add `provider = google-beta` to your resource definition. +## Resource: `google_project_service` + +### `bigquery-json.googleapis.com` is no longer a valid service name + +`bigquery-json.googleapis.com` was deprecated in the `3.0.0` release, however, at that point the provider +converted it while the upstream API migration was in progress. Now that the API migration has finished, +the provider will no longer convert the service name. Use `bigquery.googleapis.com` instead. +