lleps/terraform-validator

Foreign resource monitoring not working after db optimization

Closed this issue · 0 comments

lleps commented

Because loads all the foreign resources, but doesn't load states, which are used to determine if the resource is foreign or not.
Solution is to add two functions: losdAllTFStatesMinimal and loadAllTFStatesFull.
Also use the full version on state monitoring as well, to avoid a bunch of get requests.

The minimal/full postfix makes the meaning cleaner without needing documentation. Should be applied to all db.getAll* functions.