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 BBBmau committed Jun 28, 2024
1 parent 9977bb6 commit 0d55deb
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 0d55deb

Please sign in to comment.