patrickchugh / terravision

Terravision creates Professional Cloud Architecture Diagrams from your Terraform code automatically. Supports AWS, Google and Azure.
Mozilla Public License 2.0
683 stars 67 forks source link

Infinite loop in interpreter.find_replace_values #127

Open antoinebon opened 3 weeks ago

antoinebon commented 3 weeks ago

The function find_replace_values of the interpreter module runs into some infinite recursive calls due to find_replace_values and replace_module_vars mutually calling each other

Here is an example value of the value variable that results in an infinite recursion:

'[{\'instance_type\': \'var.broker_instance_type \', \'client_subnets\': \'var.subnet_ids \', \'security_groups\': "var.create_security_group ? concat(var.associated_security_group_ids, [\'module.security_group.id \']) : var.associated_security_group_ids ", \'storage_info\': [{\'ebs_storage_info\': [{\'volume_size\': \'var.broker_volume_size \'}]}], \'connectivity_info\': [{\'public_access\': [{\'type\': \'var.public_access_enabled ? "SERVICE_PROVIDED_EIPS" : "DISABLED" \'}]}]}]'