Adds support for specifying the state file (https://developer.hashicorp.com/terraform/language/settings/backends/local#command-line-arguments) during plan. This is very useful for setting up test cases for, "what if I modified this attribute on an already provisioned resource?". It is possible to achieve the same thing today using init_vars during setup, but that introduces modifies the init cache key and hence requires an init per test case using a state file. Using the plan feature affects only the plan cache key, so saves some time overall.
Adds support for specifying the state file (https://developer.hashicorp.com/terraform/language/settings/backends/local#command-line-arguments) during
plan
. This is very useful for setting up test cases for, "what if I modified this attribute on an already provisioned resource?". It is possible to achieve the same thing today usinginit_vars
duringsetup
, but that introduces modifies theinit
cache key and hence requires aninit
per test case using a state file. Using the plan feature affects only the plan cache key, so saves some time overall.