You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it appears that resources defined with count or for_each are not being parsed properly. The TerraformState.parse_state function always picks the first instance of each resource, so any resources defined as multiple instance resources lose the latter resources when the tfstate file is parsed.
Good call @mviamari . We'll need to be careful about not breaking existing tests when fixing this, but we should certainly support resources with more than one instance. Thank you!
Currently it appears that resources defined with
count
orfor_each
are not being parsed properly. TheTerraformState.parse_state
function always picks the first instance of each resource, so any resources defined as multiple instance resources lose the latter resources when the tfstate file is parsed.https://github.com/cloud-custodian/pytest-terraform/blob/main/pytest_terraform/tf.py#L269
Example:
in the state file
The text was updated successfully, but these errors were encountered: