|
1 | 1 | // Copyright (c) HashiCorp, Inc. |
2 | 2 | // SPDX-License-Identifier: MPL-2.0 |
| 3 | + |
| 4 | +// ---------------------------------------------------------------------------- |
| 5 | +// |
| 6 | +// *** AUTO GENERATED CODE *** Type: MMv1 *** |
| 7 | +// |
| 8 | +// ---------------------------------------------------------------------------- |
| 9 | +// |
| 10 | +// This file is automatically generated by Magic Modules and manual |
| 11 | +// changes will be clobbered when the file is regenerated. |
| 12 | +// |
| 13 | +// Please read more about how to change this file in |
| 14 | +// .github/CONTRIBUTING.md. |
| 15 | +// |
| 16 | +// ---------------------------------------------------------------------------- |
| 17 | + |
3 | 18 | package datacatalog |
4 | 19 |
|
5 | 20 | import ( |
@@ -49,7 +64,7 @@ func testSweepDataCatalogTaxonomy(region string) error { |
49 | 64 | }, |
50 | 65 | } |
51 | 66 |
|
52 | | - listTemplate := strings.Split("https://datacatalog.googleapis.com/v1/projects/{{project}}/locations/{{region}}/taxonomies", "?")[0] |
| 67 | + listTemplate := strings.Split("https://datacatalog.googleapis.com/v1beta1/projects/{{project}}/locations/{{region}}/taxonomies", "?")[0] |
53 | 68 | listUrl, err := tpgresource.ReplaceVars(d, config, listTemplate) |
54 | 69 | if err != nil { |
55 | 70 | log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) |
@@ -88,12 +103,12 @@ func testSweepDataCatalogTaxonomy(region string) error { |
88 | 103 |
|
89 | 104 | name := tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) |
90 | 105 | // Skip resources that shouldn't be sweeped |
91 | | - if !sweeper.IsSweepableTestResource(name) { |
| 106 | + if !sweeper.IsSweepableTestResource(obj["displayName"].(string)) { |
92 | 107 | nonPrefixCount++ |
93 | 108 | continue |
94 | 109 | } |
95 | 110 |
|
96 | | - deleteTemplate := "https://datacatalog.googleapis.com/v1/{{display_name}}" |
| 111 | + deleteTemplate := "https://datacatalog.googleapis.com/v1beta1/{{name}}" |
97 | 112 | deleteUrl, err := tpgresource.ReplaceVars(d, config, deleteTemplate) |
98 | 113 | if err != nil { |
99 | 114 | log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) |
|
0 commit comments