terraform-plugin-framework icon indicating copy to clipboard operation
terraform-plugin-framework copied to clipboard

Examples in documentation are using deprecated code

Open Fyusel opened this issue 8 months ago • 0 comments

Module version

v1.12.x (latest version)

Expected Behavior

Code examples do not contain deprecated SDKv2 code.

Actual Behavior

During research how to obtain the client inside the checkDestroy() function for the terraform-plugin-testing I came across that the documentation still contains old SDKv2 (deprecated) code.

CheckDestroy() documentation with example: checkDestroy

This example is the same as for the SDKv2 and is using Providers: inside the test which gets an *schema.Provider as input. This is not possible by using the github.com/hashicorp/terraform-plugin-testing.

Can you please update the examples or describe how to obtain the client inside the checkDestroy() function which is already used by the test to create/update/destroy resources? Currently we are creating a new separate client in the checkDestroy() but want to use the same as the test is already using.

Fyusel avatar May 13 '25 09:05 Fyusel