[GH-ISSUE #127] Infinite loop in interpreter.find_replace_values #70

Closed
opened 2026-05-06 12:37:04 +02:00 by BreizhHardware · 1 comment

Originally created by @antoinebon on GitHub (Jun 13, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/127

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" \'}]}]}]'
Originally created by @antoinebon on GitHub (Jun 13, 2024). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/127 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" \'}]}]}]' ```
Author
Owner

@patrickchugh commented on GitHub (Dec 16, 2025):

Fixed with latest code

<!-- gh-comment-id:3662735314 --> @patrickchugh commented on GitHub (Dec 16, 2025): Fixed with latest code
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#70
No description provided.