(terraform-plugin-framework) What is the replacement for `WaitForState` or `RetryContext`

How should we implement the WaitForStateor RetryContext functionality in the new Terraform plugin framework.

We have a lot of long-running operations and we need to wait for the resource to be fully provisioned.

Thanks

Hi again @tiwood :smile:

These pieces of terraform-plugin-sdk helper/resource package functionality:

Do not have an equivalent implementation in terraform-plugin-framework. This exported functionality is actually not specific to terraform-plugin-sdk based code and can be used in terraform-plugin-framework based code (or really, any Go code) by importing the terraform-plugin-sdk package code as necessary.

It is not exactly clear at the moment whether these will be ever ported to the terraform-plugin-framework codebase, since its generic Go code to handle retries in a particular manner. There are likely community Go modules that implement similar functionality, but I have not personally done any particular discovery effort in this area. If there is nothing out there that is similar and “friendly” enough for provider development use cases, they could potentially be introduced as separate Go module(s).

I went ahead and created Document Outside Framework Migration Items (Retry, WaitForState, etc) · Issue #513 · hashicorp/terraform-plugin-framework · GitHub to ensure that the framework’s migration guide includes at least some mention of how to handle these. As part of that documentation effort when it occurs (or if there are good insights gained in this discussion!), we can decide how to best proceed.

Cheers.