@@ -19,6 +19,7 @@ import (
19
19
{{- end }}
20
20
21
21
"github.com/hashicorp/terraform-provider-google/google/envvar"
22
+ "github.com/hashicorp/terraform-provider-google/google/services/tags"
22
23
tpgcompute "github.com/hashicorp/terraform-provider-google/google/services/compute"
23
24
"github.com/hashicorp/terraform-provider-google/google/services/privateca"
24
25
"github.com/hashicorp/terraform-provider-google/google/services/resourcemanager"
@@ -2087,7 +2088,7 @@ func BootstrapSharedTestTagKey(t *testing.T, testId string) string {
2087
2088
"description": "Bootstrapped tag key for Terraform Acceptance testing",
2088
2089
}
2089
2090
2090
- _ , err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
2091
+ res , err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
2091
2092
Config: config,
2092
2093
Method: "POST",
2093
2094
Project: config.Project,
@@ -2101,6 +2102,15 @@ func BootstrapSharedTestTagKey(t *testing.T, testId string) string {
2101
2102
}
2102
2103
2103
2104
log.Printf("[DEBUG] Waiting for shared tag key creation to finish")
2105
+
2106
+ err = tags.TagsOperationWaitTime(
2107
+ config, res, "Creating TagKey", config.UserAgent,
2108
+ 20 * time.Minute)
2109
+
2110
+ if err != nil {
2111
+ // The resource didn't actually create
2112
+ t.Fatalf("Error waiting to create TagKey: %s", err)
2113
+ }
2104
2114
}
2105
2115
2106
2116
_, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
@@ -2163,7 +2173,7 @@ func BootstrapSharedTestTagValue(t *testing.T, testId string, tagKey string) str
2163
2173
"description": "Bootstrapped tag value for Terraform Acceptance testing",
2164
2174
}
2165
2175
2166
- _ , err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
2176
+ res , err : = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
2167
2177
Config: config,
2168
2178
Method: "POST",
2169
2179
Project: config.Project,
@@ -2172,11 +2182,21 @@ func BootstrapSharedTestTagValue(t *testing.T, testId string, tagKey string) str
2172
2182
Body: tagKeyObj,
2173
2183
Timeout: 10 * time.Minute,
2174
2184
})
2185
+
2175
2186
if err != nil {
2176
2187
t.Fatalf("Error bootstrapping shared tag value %q: %s", sharedTagValue, err)
2177
2188
}
2178
2189
2179
2190
log.Printf("[DEBUG] Waiting for shared tag value creation to finish")
2191
+
2192
+ err = tags.TagsOperationWaitTime(
2193
+ config, res, "Creating TagValue", config.UserAgent,
2194
+ 20 * time.Minute)
2195
+
2196
+ if err != nil {
2197
+ // The resource didn't actually create
2198
+ t.Fatalf("Error waiting to create TagValue: %s", err)
2199
+ }
2180
2200
}
2181
2201
2182
2202
_, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
0 commit comments