Skip to content

Commit cb0ed82

Browse files
remove bigquery-json.google-apis.com from renamed services as its no longer allowed (#5250) (#10370)
* remove bigquery-json.google-apis.com from renamed services as its no longer allowed * update upgrade guide Signed-off-by: Modular Magician <[email protected]>
1 parent 788f2b8 commit cb0ed82

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.changelog/5250.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:breaking-change
2+
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.
3+
```

google/resource_google_project_service.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ var bannedProjectServices = []string{"bigquery-json.googleapis.com"}
4444
// "DEPRECATED FOR {{version}} next to entries slated for removal in {{version}}
4545
// upon removal, we should disallow the old name from being used even if it's
4646
// not gone from the underlying API yet
47-
var renamedServices = map[string]string{
48-
"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.
49-
}
47+
var renamedServices = map[string]string{}
5048

5149
// renamedServices in reverse (new -> old)
5250
var renamedServicesByNewServiceNames = reverseStringMap(renamedServices)

google/resource_google_project_service_test.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,23 @@ func TestAccProjectService_handleNotFound(t *testing.T) {
176176
func TestAccProjectService_renamedService(t *testing.T) {
177177
t.Parallel()
178178

179+
if len(renamedServices) == 0 {
180+
t.Skip()
181+
}
182+
183+
var newName string
184+
for _, new := range renamedServices {
185+
newName = new
186+
}
187+
179188
org := getTestOrgFromEnv(t)
180189
pid := fmt.Sprintf("tf-test-%d", randInt(t))
181190
vcrTest(t, resource.TestCase{
182191
PreCheck: func() { testAccPreCheck(t) },
183192
Providers: testAccProviders,
184193
Steps: []resource.TestStep{
185194
{
186-
Config: testAccProjectService_single("bigquery.googleapis.com", pid, pname, org),
195+
Config: testAccProjectService_single(newName, pid, pname, org),
187196
},
188197
{
189198
ResourceName: "google_project_service.test",

website/docs/guides/version_4_upgrade.html.markdown

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ description: |-
2929
- [`node_config.workload_metadata_config.node_metadata` is now removed](#node_configworkload_metadata_confignode_metadata-is-now-removed)
3030
- [`workload_identity_config.0.identity_namespace` is now removed](#workload_identity_config0identity_namespace-is-now-removed)
3131
- [`pod_security_policy_config` is removed from the GA provider](#pod_security_policy_config-is-removed-from-the-ga-provider)
32+
- [Resource: `google_project_service`](#resource-google_project_service)
33+
- [`bigquery-json.googleapis.com` is no longer a valid service name](#bigquery-json.googleapis.com-is-no-longer-a-valid-service-name)
3234

3335
<!-- /TOC -->
3436

@@ -233,3 +235,11 @@ This field was incorrectly included in the GA `google` provider in past releases
233235
In order to continue to use the feature, add `provider = google-beta` to your
234236
resource definition.
235237

238+
## Resource: `google_project_service`
239+
240+
### `bigquery-json.googleapis.com` is no longer a valid service name
241+
242+
`bigquery-json.googleapis.com` was deprecated in the `3.0.0` release, however, at that point the provider
243+
converted it while the upstream API migration was in progress. Now that the API migration has finished,
244+
the provider will no longer convert the service name. Use `bigquery.googleapis.com` instead.
245+

0 commit comments

Comments
 (0)