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 :
If a test is defined with an exludes tag but no resource of that type is defined anywhere in the plan, then terraform-compliance errors with ERROR: Hook 'exclude_resources' from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/terraform_compliance/steps/terrain.py:85 raised: 'AttributeError: 'Context' object has no attribute 'stash''
terraform init && terraform plan -out plan.out && terraform-compliance -p plan.out -f features
Run using pip package
Error output:
Feature: Load balancer should use certain policies for HTTPS # /Users/***/features/naughty.feature
@exclude_aws_lb_listener.listener_to_exclude
Scenario: Load balancer should use certain policies for HTTPS
💡 SKIPPING: Can not find aws_lb_listener defined in target terraform plan.
Given I have aws_lb_listener defined
1 features (0 passed, 1 skipped)
1 scenarios (0 passed, 1 skipped)
6 steps (0 passed, 1 skipped)
Run 1618825783 finished within a moment
❗ ERROR: Hook 'exclude_resources' from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/terraform_compliance/steps/terrain.py:85 raised: 'AttributeError: 'Context' object has no attribute 'stash''
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/radish/hookregistry.py", line 132, in call
func(model, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/terraform_compliance/steps/terrain.py", line 97, in exclude_resources
for resource in step.context.stash:
AttributeError: 'Context' object has no attribute 'stash'
<Your feature/scenario/steps>
Feature: Load balancer should use certain policies for HTTPS@exclude_aws_lb_listener.listener_to_excludeScenario: Load balancer should use certain policies for HTTPSGiven I have aws_lb_listener defined
When its port is 443
When its protocol is HTTPS
When it has ssl_policy
Then it must have ssl_policy
And its value must match the "ffoo-with-tls-1-2|bar-with-tls-1-2|etc-with-tls-1-2" regex
Expected behavior :
The tests should pass since no non-compliant LB listener is defined in the plan.
Tested versions :
<terraform-compliance version (terraform-compliance -v)> - present in 1.3.13 and 1.3.14
<terraform version (terraform -v)> - tested with 0.12.29 and 0.13.6
<python runtime version, if running as a python package (python --version)> - tested with 3.8.1
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Description :
If a test is defined with an exludes tag but no resource of that type is defined anywhere in the plan, then terraform-compliance errors with
ERROR: Hook 'exclude_resources' from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/terraform_compliance/steps/terrain.py:85 raised: 'AttributeError: 'Context' object has no attribute 'stash''
To Reproduce
terraform init && terraform plan -out plan.out && terraform-compliance -p plan.out -f features
Expected behavior :
The tests should pass since no non-compliant LB listener is defined in the plan.
Tested versions :
terraform-compliance -v
)> - present in 1.3.13 and 1.3.14terraform -v
)> - tested with 0.12.29 and 0.13.6python --version
)> - tested with 3.8.1Additional context
N/A
The text was updated successfully, but these errors were encountered: