Skip to content

Commit

Permalink
Add a sleep to reduce the likelihood of eventual consistency issue (G…
Browse files Browse the repository at this point in the history
  • Loading branch information
LujieZ authored and vijaykanthm committed Jul 22, 2024
1 parent 5377fbf commit 535cfb7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ func resourceGoogleServiceAccountKeyCreate(d *schema.ResourceData, meta interfac
if err != nil {
return err
}

// We can't guarantee complete consistency even after waiting on
// the results, so sleep for some additional time to reduce the
// likelihood of eventual consistency failures.
time.Sleep(10 * time.Second)

return resourceGoogleServiceAccountKeyRead(d, meta)
}

Expand Down

0 comments on commit 535cfb7

Please sign in to comment.