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

New Check: V2 (*resource.StateChangeConf).WaitForState() Deprecation #181

Open
bflad opened this issue Aug 5, 2020 · 0 comments
Open

New Check: V2 (*resource.StateChangeConf).WaitForState() Deprecation #181

bflad opened this issue Aug 5, 2020 · 0 comments
Labels
ast AST Handling check/resource Resource Check new-check New Lint Check

Comments

@bflad
Copy link
Owner

bflad commented Aug 5, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The (*github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.StateChangeConf).WaitForState() receiver method is deprecated in preference of the context-aware WaitForStateContext(). The new functionality is not available in version 1 of the Terraform Plugin SDK so this check should only flag version 2 usage of WaitForState.

New or Affected Checks(s)

  • R###

Flagged Provider Code

conf := &resource.StateChangeConf{ /* ... */ }
conf.WaitForState()

Passing Provider Code

conf := &resource.StateChangeConf{ /* ... */ }
conf.WaitForStateContext(context.TODO()) // or plumbing the appropriate context through

References

@bflad bflad added ast AST Handling new-check New Lint Check check/resource Resource Check labels Aug 5, 2020
@bflad bflad changed the title New Check: V2 (*resource.StateChangeConf).WaitForState Deprecation New Check: V2 (*resource.StateChangeConf).WaitForState() Deprecation Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast AST Handling check/resource Resource Check new-check New Lint Check
Projects
None yet
Development

No branches or pull requests

1 participant