Open
Description
terraform-plugin-testing version
v1.5.1
Use cases
This Go module provides a few abstractions for asserting whether providers are planning a change that will affect state:
TestStep.ExpectNonEmptyPlan
TestStep.PlanOnly
(mainly to avoid the implicit apply of aConfig*
test step)plancheck.ExpectEmptyPlan()
plancheck.ExpectNonEmptyPlan()
In #222, it was noted that due to their naming ExpectEmptyPlan
and ExpectNonEmptyPlan
should be capturing all plan changes that would affect the saved state -- both resource changes and output changes. However, there could be situations where developers want to write generic assertions against only resource changes or only output changes being expected (or not) to occur. This feature request is here to capture interest and use cases.
Proposal
Introduce separate, but still generic plan checks against any/all resource/output changes, e.g.
plancheck.ExpectNoOutputChanges()
plancheck.ExpectNoResourceChanges()
plancheck.ExpectOutputChanges()
plancheck.ExpectResourceChanges()
References
- Consider Plan Check for Output Value Changes #221 (targeted output value change check)
- plancheck: ExpectEmptyPlan Does Not Account for Output Changes #222