Skip to content

Commit 2c77e07

Browse files
gurusai-voletiamanMahendroo
authored andcommitted
fix: remove retry in read as retry for create/update is already handled in respective methods (GoogleCloudPlatform#12028)
1 parent b5b0396 commit 2c77e07

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

mmv1/third_party/terraform/services/storage/resource_storage_bucket.go.tmpl

+1-10
Original file line numberDiff line numberDiff line change
@@ -961,18 +961,9 @@ func resourceStorageBucketRead(d *schema.ResourceData, meta interface{}) error {
961961
// Get the bucket and acl
962962
bucket := d.Get("name").(string)
963963

964-
var res *storage.Bucket
965964
// There seems to be some eventual consistency errors in some cases, so we want to check a few times
966965
// to make sure it exists before moving on
967-
err = transport_tpg.Retry(transport_tpg.RetryOptions{
968-
RetryFunc: func() (operr error) {
969-
var retryErr error
970-
res, retryErr = config.NewStorageClient(userAgent).Buckets.Get(bucket).Do()
971-
return retryErr
972-
},
973-
Timeout: d.Timeout(schema.TimeoutRead),
974-
ErrorRetryPredicates: []transport_tpg.RetryErrorPredicateFunc{transport_tpg.IsNotFoundRetryableError("bucket read")},
975-
})
966+
res, err := config.NewStorageClient(userAgent).Buckets.Get(bucket).Do()
976967

977968
if err != nil {
978969
return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("Storage Bucket %q", d.Get("name").(string)))

0 commit comments

Comments
 (0)