diff --git a/.changelog/12570.txt b/.changelog/12570.txt new file mode 100644 index 00000000000..d528eb8ffd9 --- /dev/null +++ b/.changelog/12570.txt @@ -0,0 +1,3 @@ +```release-note:none +managedkafka: added 5 second wait post `google_managed_kafka_topic` update to fix eventual consistency errors +``` \ No newline at end of file diff --git a/google/services/managedkafka/resource_managed_kafka_topic.go b/google/services/managedkafka/resource_managed_kafka_topic.go index 5d88f831381..5735bc4a163 100644 --- a/google/services/managedkafka/resource_managed_kafka_topic.go +++ b/google/services/managedkafka/resource_managed_kafka_topic.go @@ -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) }