error on function _mount_resources
due to non-iterable self.resources[source_resource]['values']
#554
Labels
_mount_resources
due to non-iterable self.resources[source_resource]['values']
#554
Description
terraform-compliance is failing on
terraform_compliance/extensions/terraform.py#L321
with tf 1.0.6 and tf.10.5To Reproduce
Plan File:
I'm working on cutting and anonymizing the plan file - will attach it soon
this is the resource that fails when looped over in the _mount_resources function:
{'address': 'module.tgw-dev.module.tgw-attach-accept.aws_ec2_transit_gateway_vpc_attachment_accepter.tgw_accept[0]', 'module_address': 'module.tgw-dev.module.tgw-attach-accept', 'mode': 'managed', 'type': 'aws_ec2_transit_gateway_vpc_attachment_accepter', 'name': 'tgw_accept', 'index': 0, 'provider_name': 'registry.terraform.io/hashicorp/aws', 'values': None, 'terraform-compliance.mounted_resources': {}, 'terraform-compliance.mounted_resources.addresses': {}, 'terraform-compliance.mounted_resources.addresses_list': []}
Running via Docker:
No
Error Output:
with version 1.3.27 we get this output:
with 1.3.26 the error output is different:
Expected Behavior:
I'd expect the plan to pass compliance
Tested Versions:
1.3.27
1.0.6
python 3.8.11
Additional Context:
I believe this is related to your recent bugfix .27 and to issues with terraform 1.0.6 and 1.0.5. Probably checking `if source_reource.get('values') would stop it from tripping. I'll have a play with the code as well.
The text was updated successfully, but these errors were encountered: