Open bflad opened 2 years ago
Hi,
I personally recommend https://pkg.go.dev/github.com/cenkalti/backoff/v4 as an alternative to WaitForStateContext()
.
an example how to achieve waiting for a backend api in a Framework-powered ressource can be seen here: https://github.com/camunda-community-hub/terraform-provider-camunda/pull/16/files#diff-e4a2503a3ad56084481de67605aa1cea9640bf1dee2c161a8890da50733950cc
it uses github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource
Module version
Use-cases
Provider developers migrating from terraform-plugin-sdk may ask about functionality that is intentionally not included in the framework.
For example:
helper/logging.NewLoggingHTTPTransport()
helper/resource.RetryContext()
(helper/resource.StateChangeConf).WaitForStateContext()
Provider developers should be able to use the existing sdk functionality until better guidance can be given.
Proposal
I'm not exactly sure the best way to approach this, but maybe include new documentation page(s) in the framework migration guide that discuss these items. Refer any questions to those documentation page(s).
The helper/logging functionality will likely be copied into terraform-plugin-log. The helper/resource bits are more of a gray area (similar to how we've intentionally not included mutex/semaphore capabilities, which can be served with Go standard library or community Go modules).
References