-
Notifications
You must be signed in to change notification settings - Fork 238
ImportStateVerify should apply DiffSuppressFuncs #103
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
Comments
The next version of terraform-plugin-sdk/v2, unreleased at the moment, but slated to be v2.11.0 adds an additional We expect The |
I'm not entirely sure that With that said, I may be misunderstanding the original problem statement here. I think I've never written tests for an import function in particular and so I'm not sure exactly how that test process behaves; perhaps there's something extra going on for that particular testing situation which changes the circumstances so that |
I filed this FR a while back so I don't have all the same context I did back then, but from what I remember: the Google provider uses As a contrived simple example, let's say we have a string field, and we don't care about case. In a real life situation, the config could have Also cc @rileykarson who can probably talk about whether this is still a problem and may even be able to give real examples of trying to work around this. |
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.
The text was updated successfully, but these errors were encountered: