Skip to content
This repository was archived by the owner on Jun 27, 2021. It is now read-only.

Commit 4dfd36b

Browse files
committed
group creation: sleep 1 second
1 parent b14c1af commit 4dfd36b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gsuite/resource_group.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"log"
66
"strings"
7+
"time"
78

89
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
910
directory "google.golang.org/api/admin/directory/v1"
@@ -88,6 +89,9 @@ func resourceGroupCreate(d *schema.ResourceData, meta interface{}) error {
8889
return err
8990
}, config.TimeoutMinutes)
9091

92+
// give the eventually consistent G Suite time to settle the group
93+
time.Sleep(time.Second * 1)
94+
9195
if err != nil {
9296
if config.UpdateExisting && strings.Contains(fmt.Sprintf("%s", err), "Entity already exists.") {
9397
log.Printf("[INFO] Group already exists, overwriting existing values")

0 commit comments

Comments
 (0)