mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-26 16:36:26 -06:00
51346f0d87
In order to precisely implement the validation rules for "moved" statements we need to be able to test whether particular instances were declared in the configuration. The instance expander is the source of record for which instances we decided while creating a plan, but it's API is far more involved than what our validation rules need, so this new AllInstances method returns a wrapper object with a more straightforward API that provides read-only access to just the question of whether particular instances got registered in the expander already. This API covers all three of the kinds of objects that move statements can refer to. It includes module calls and resources, even though they aren't _themselves_ "instances" in the sense we usually mean, because the module instance addresses they are contained within _are_ instances and so we need to take their dynamic instance keys into account when answering these queries. |
||
---|---|---|
.. | ||
expander_test.go | ||
expander.go | ||
expansion_mode.go | ||
instance_key_data.go | ||
set_test.go | ||
set.go |