Skip to content

Commit

Permalink
Add post update 5s sleep to Topic update (#12570) (#20772)
Browse files Browse the repository at this point in the history
[upstream:1a28a91cf77e481d012718eec9bdf7524c663e4f]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Dec 20, 2024
1 parent 2a6fedd commit 355f3e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/12570.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none
managedkafka: added 5 second wait post `google_managed_kafka_topic` update to fix eventual consistency errors
```
4 changes: 4 additions & 0 deletions google/services/managedkafka/resource_managed_kafka_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ func resourceManagedKafkaTopicUpdate(d *schema.ResourceData, meta interface{}) e

}

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

Expand Down

0 comments on commit 355f3e8

Please sign in to comment.