Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper/resource: Add Go Deprecation Messages That Point To terraform-plugin-testing #1324

Open
bflad opened this issue Mar 12, 2024 · 0 comments
Labels
subsystem/tests Issues and feature requests related to the testing framework. technical-debt

Comments

@bflad
Copy link
Member

bflad commented Mar 12, 2024

SDK version

v2.33.0

Use-cases

For over a year now, provider acceptance testing functionality has been forked into the separate terraform-plugin-testing Go module with its own website documentation. In there is a migration guide, that mainly is about updating import statements to point at the new Go module. There is a lot of value add functionality only being added in the new Go module, such as Terraform version checks, plan checks, not requiring id attribute, etc. but developers might not be aware at all of the new Go module because nothing has ever prompted them in that direction (release notes, Go documentation deprecation comments, etc.).

The original plan was to deprecate the entire terraform-plugin-sdk Go module at once, but that decision has been repeatedly deferred for other priorities. Deprecating the acceptance testing functionality is a much smaller ask.

Proposal

Add Go documentation Deprecated: comments for all helper/resource package functionality that points developers at the newer terraform-plugin-testing Go module.

For example:

// ... existing Go docs ...
//
// Deprecated: Use the equivalent terraform-plugin-testing Go module helper/resource.XXX instead. Refer to the [migration guide] for additional information.
//
// [migration guide]: https://developer.hashicorp.com/terraform/plugin/testing/migrating

In the website documentation, ensure all pages in the testing section include callouts that mention the new Go module and the migration guide.

@bflad bflad added technical-debt subsystem/tests Issues and feature requests related to the testing framework. labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem/tests Issues and feature requests related to the testing framework. technical-debt
Projects
None yet
Development

No branches or pull requests

1 participant