Skip to content

Commit

Permalink
Add sleep so google_project is ready before returning (#3388) (#1970)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 21, 2020
1 parent 9b55788 commit b7ebd9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3388.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resourcemanager: added a wait to `google_project` so that projects are more likely to be ready before the resource finishes creation
```
4 changes: 4 additions & 0 deletions google-beta/resource_google_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ func resourceGoogleProjectCreate(d *schema.ResourceData, meta interface{}) error
}
}

// Sleep for 10s, letting the billing account settle before other resources
// try to use this project.
time.Sleep(10 * time.Second)

err = resourceGoogleProjectRead(d, meta)
if err != nil {
return err
Expand Down

0 comments on commit b7ebd9a

Please sign in to comment.