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
Description :
Using for_each with a value that contains a '.' results in the stack trace below when two resources are linked.
Error: Hook 'load_terraform_data' from /Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/terraform_compliance/steps/terrain.py:5 raised: 'ValueError: too many values to unpack (expected 2)'
Traceback (most recent call last):
File "/Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/radish/hookregistry.py", line 132, in call
func(model, *args, **kwargs)
File "/Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/terraform_compliance/steps/terrain.py", line 7, in load_terraform_data
world.config.terraform = TerraformParser(world.config.user_data['plan_file'])
File "/Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/terraform_compliance/extensions/terraform.py", line 38, in __init__
self.parse()
File "/Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/terraform_compliance/extensions/terraform.py", line 279, in parse
self._mount_references()
File "/Users/michaelw/Virtualenvs/terraform_012/lib/python3.7/site-packages/terraform_compliance/extensions/terraform.py", line 249, in _mount_references
ref_type, ref_address = source_resource.split('.')
ValueError: too many values to unpack (expected 2)
Description :
Using for_each with a value that contains a '.' results in the stack trace below when two resources are linked.
To Reproduce
1.
Expected behavior :
Terraform compliance should run and test the supplied scenarios.
Tested versions :
terraform-compliance -v
)> 1.0.58terraform -v
)> v0.12.17python --version
)> Python 3.7.5Additional context
Modifying https://github.com/eerkunt/terraform-compliance/blob/master/terraform_compliance/extensions/terraform.py#L248 to ref_type, ref_address = source_resource.split('.', maxsplit=1) appears to resolve, but I don't know what other implications that might have.
The text was updated successfully, but these errors were encountered: