Skip to content

Commit 1506b7f

Browse files
Add post update 5s sleep to Topic update (#12570) (#8966)
[upstream:1a28a91cf77e481d012718eec9bdf7524c663e4f] Signed-off-by: Modular Magician <[email protected]>
1 parent 4ad1fe9 commit 1506b7f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changelog/12570.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
managedkafka: added 5 second wait post `google_managed_kafka_topic` update to fix eventual consistency errors
3+
```

google-beta/services/managedkafka/resource_managed_kafka_topic.go

+4
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ func resourceManagedKafkaTopicUpdate(d *schema.ResourceData, meta interface{}) e
322322

323323
}
324324

325+
// This is useful if the resource in question doesn't have a perfectly consistent API
326+
// That is, the Operation for Create might return before the Get operation shows the
327+
// completed state of the resource.
328+
time.Sleep(5 * time.Second)
325329
return resourceManagedKafkaTopicRead(d, meta)
326330
}
327331

0 commit comments

Comments
 (0)