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 :
When adding an argument block that can be added multiple times (e.g. aws_instance.network_interface) to a resource only once, the count returned is the size of the first object not the size of the list. This makes it impossible to ensure there is only one (or the size of the map for the argument).
I first noticed this counting google_compute_firewall.allow but realise that this is probably more AWS focused so have put together enough to generate a plan without requiring credentials.
Seems to happen in steps.pyit_condition_contain_something
$ terraform-compliance -p plan.out -f ./
terraform-compliance local development version initiated
. Converting terraform plan file.
* Features : /home/andy/src/terraform-compliance/bug
* Plan File : /home/andy/src/terraform-compliance/bug/plan.out.json
. Running tests.
Feature: Count bug # /home/andy/src/terraform-compliance/bug/count.feature
Scenario: Ensure one network is attached to one
Given I have aws_instance defined
When its name is one
And it contains network_interface
And I count them
Then I expect the result is equal to 1
Failure: for aws_instance.one on network_interface. 3 is not equal to 1.
Scenario: Ensure two networks are attached to two
Given I have aws_instance defined
When its name is two
And it contains network_interface
And I count them
Then I expect the result is equal to 2
1 features (0 passed, 1 failed)
2 scenarios (1 passed, 1 failed)
10 steps (9 passed, 1 failed)
Run 1576845649 finished within a moment
Feature: Count bugScenario: Ensure one network is attached to oneGiven I have aws_instance defined
When its name is one
And it contains network_interface
And I count them
Then I expect the result is equal to 1
Scenario: Ensure two networks are attached to twoGiven I have aws_instance defined
When its name is two
And it contains network_interface
And I count them
Then I expect the result is equal to 2
Expected behavior :
Tested versions :
terraform-compliance v1.0.58 initiated
Terraform v0.12.17
The text was updated successfully, but these errors were encountered:
Description :
When adding an argument block that can be added multiple times (e.g. aws_instance.network_interface) to a resource only once, the count returned is the size of the first object not the size of the list. This makes it impossible to ensure there is only one (or the size of the map for the argument).
I first noticed this counting google_compute_firewall.allow but realise that this is probably more AWS focused so have put together enough to generate a plan without requiring credentials.
To Reproduce
1.
steps.py
it_condition_contain_something
Expected behavior :
Tested versions :
The text was updated successfully, but these errors were encountered: