From 46c21e0ca434536f3da59592f1be333597bc09d5 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 28 May 2024 14:28:03 -0700 Subject: [PATCH] Add a sleep `google_service_account` to reduce the likelihood of eventual consistency errors (#10813) (#18261) [upstream:86935162103d83c8b9c3cdeae8833a1173ea9fb2] Signed-off-by: Modular Magician --- .../resourcemanager/resource_google_service_account.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/google/services/resourcemanager/resource_google_service_account.go b/google/services/resourcemanager/resource_google_service_account.go index 999703c3354..30cf8684213 100644 --- a/google/services/resourcemanager/resource_google_service_account.go +++ b/google/services/resourcemanager/resource_google_service_account.go @@ -160,6 +160,11 @@ func resourceGoogleServiceAccountCreate(d *schema.ResourceData, meta interface{} return err } + // We can't guarantee complete consistency even after polling, + // so sleep for some additional time to reduce the likelihood of + // eventual consistency failures. + time.Sleep(10 * time.Second) + return resourceGoogleServiceAccountRead(d, meta) }