hashicorp / terraform-plugin-framework

A next-generation framework for building Terraform providers.
https://developer.hashicorp.com/terraform/plugin/framework
Mozilla Public License 2.0
303 stars 93 forks source link

Document Outside Framework Migration Items (Retry, WaitForState, etc) #513

Open bflad opened 2 years ago

bflad commented 2 years ago

Module version

v0.14.0

Use-cases

Provider developers migrating from terraform-plugin-sdk may ask about functionality that is intentionally not included in the framework.

For example:

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

yann-soubeyrand commented 1 year ago

Hi,

I personally recommend https://pkg.go.dev/github.com/cenkalti/backoff/v4 as an alternative to WaitForStateContext().

azrdev commented 3 months ago

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