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: Deprecate Module Functionality #98

Closed
bflad opened this issue Mar 10, 2023 · 1 comment · Fixed by #109
Closed

helper/resource: Deprecate Module Functionality #98

bflad opened this issue Mar 10, 2023 · 1 comment · Fixed by #109
Assignees
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Mar 10, 2023

terraform-plugin-testing version

v1.1.0

Description

The helper/resource package from Terraform core originally helped test assertions with both providers and modules. When terraform-plugin-sdk split off from core, the module testing became extraneous due to its new context. Provider developers almost always can just test configurations within the root module. Bugs with module handling should be treated as core bugs, not provider developer concerns.

To verify the ecosystem is not depending on this functionality anymore, querying cs.github.com with filters such as TestCheckModuleNoResourceAttr language:Go NOT is:archived NOT is:fork shows:

TestCheckModuleNoResourceAttr - 0 usage
TestCheckModuleResourceAttr - 0 usage
TestCheckModuleResourceAttrPair - 0 usage
TestCheckModuleResourceAttrPtr - 0 usage
TestCheckModuleResourceAttrSet - 0 usage
TestModuleMatchResourceAttr - 0 usage

This code likely shouldn't have made the jump from terraform-plugin-sdk to terraform-plugin-testing, but it was not deprecated over in terraform-plugin-sdk before the migration. It is now released with compatibility promises so it must be treated the same as anything else under the versioning policy.

Proposal

Add Go documentation deprecation comments saying the functionality is deprecated without replacement and that any unknown existing use cases should contact this Go module's developers.

@bflad bflad self-assigned this Mar 22, 2023
@bflad bflad added this to the v1.2.0 milestone Mar 22, 2023
bflad added a commit that referenced this issue Mar 22, 2023
bflad added a commit that referenced this issue Mar 22, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant