hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.8k stars 9.15k forks source link

[Bug]: aws_lb_listener_rule ignores count and validates the condition block #26995

Open mgzenitech opened 2 years ago

mgzenitech commented 2 years ago

Terraform Core Version

1.1.9

AWS Provider Version

4.22.0

Affected Resource(s)

Expected Behavior

count = 0 should stop any further validation of the resource as it will not be created.

Actual Behavior

│ Error: Insufficient condition blocks │ │ At least 1 "condition" blocks are required.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_lb_listener_rule" "this" {
  count = 0
  listener_arn = "whatever arn"
  priority     = null
  action {
    type             = "forward"
    target_group_arn = "whatever arn"
  }
}

Steps to Reproduce

apply the config

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 6 days ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!