Conversation
testSetResourceInstanceCurrent and testSetResourceInstanceTainted are wrapper functions around states.Module.SetResourceInstanceCurrent() used to set a resource in state. They work with current, non-deposed resources with no dependencies.
|
since our tests are currently not running: |
|
Also: I removed terraform/module_dependencies but I suspect in hindsight that was too soon to remove the entire file - I don't know the plans for |
apparentlymart
left a comment
There was a problem hiding this comment.
Nice!
My intent in the other branch was to remove the callers into the module_dependencies.go file but I'm not sure I got all of them yet, because my focus was on the codepaths related to provider installation and calling NewContext. We might need to keep those around until command/providers.go is updated, but I'm not totally sure. Could you check if it's possible to go install a Terraform binary under this change? If this set of changes can compile then I think it's fine to move ahead, but if it breaks the build then it'll of course make other concurrent work trickier. 🤔
|
Update (based on internal conversation): for the nonce I've commented out the single remaining call to |
* terraform: add helper functions for creating test state testSetResourceInstanceCurrent and testSetResourceInstanceTainted are wrapper functions around states.Module.SetResourceInstanceCurrent() used to set a resource in state. They work with current, non-deposed resources with no dependencies. testSetResourceInstanceDeposed can be used to set a desosed resource in state. * terraform: update all tests to use modern providers and state
* terraform: add helper functions for creating test state testSetResourceInstanceCurrent and testSetResourceInstanceTainted are wrapper functions around states.Module.SetResourceInstanceCurrent() used to set a resource in state. They work with current, non-deposed resources with no dependencies. testSetResourceInstanceDeposed can be used to set a desosed resource in state. * terraform: update all tests to use modern providers and state
|
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. |
terraformtests passing!I'd like to draw your attention to the two commits that add helper functions, as modifying them based on PR feedback would be easiest done right meow. 😁