hashicorp / hashicorp/terraform-plugin-sdk
ImportStateVerify should apply DiffSuppressFuncs
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
ImportStateVerify tests import a resource with a given id, and then check all fields in the imported state against an existing resource. However, it does these checks with strict equality, meaning that if a diff would have been suppressed, it still shows up in these tests as a diff. It would be great to be able to suppress those automatically so we don't have to complicate our test logic around checking those fields.
Contributor guide
Research direction
Start at the ImportStateVerify implementation and its state-comparison path, then inspect how DiffSuppressFuncs are evaluated elsewhere in the SDK. Add coverage for an imported state whose differing value is suppressible; done means ImportStateVerify no longer reports that difference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100