Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple aws_lb_listener_rule condition values #8266

Closed
tolleiv opened this issue Apr 10, 2019 · 5 comments
Closed

Support multiple aws_lb_listener_rule condition values #8266

tolleiv opened this issue Apr 10, 2019 · 5 comments
Labels
service/elbv2 Issues and PRs that pertain to the elbv2 service.

Comments

@tolleiv
Copy link

tolleiv commented Apr 10, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

v0.11.13

Affected Resource(s)

  • aws_lb_listener_rule

Terraform Configuration Files

resource "aws_lb_listener_rule" "source_ip_rule" {
  listener_arn = "${var.listener_arn}"
  priority     = 99

  action {
    type             = "forward"
    target_group_arn = "${var.targetgroup_arn}"
  }
  condition {
    field  = "source-ip"
    values = ["1.2.3.4/32","5.6.7.8/32"]
  }
}

Expected Behavior

Terraform should create a listener rule with a source-ip condition containing the two values.

Actual Behavior

Error: aws_lb_listener_rule.host_nicotua_management: condition.0.values: attribute supports 1 item maximum, config has 2 declared

Steps to Reproduce

  1. terraform validate

References

This behaviour was introduced within hashicorp/terraform#12983 but the assumption made back then is only true for some of the various condition types. Others (like the source-ip) support multiple values.

Official documentation:

@AlexeiBlue
Copy link

Just ran into the same issue for source-ip, weird that values is an array but then the documentation says a maximum of 1 can be defined.

@nywilken nywilken added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Apr 10, 2019
@amaziagur
Copy link

amaziagur commented Apr 11, 2019

Ran into same issue (with different exception)

have the same terraform version as @tolleiv (v0.11.13)
used the following code:

condition { field = "source-ip" values = ["1.2.3.4/32"] }

and got the following exception:

ValidationError: 'Values' is not supported for a condition of type 'source-ip

i saw on aws documentation the usage of source-ip field, but
for some reason i didn't saw on terraform official documentation the use of it -> https://www.terraform.io/docs/providers/aws/r/lb_listener_rule.html
and ides what im doing wrong here?

@pyranja
Copy link

pyranja commented Apr 14, 2019

source_ip and multiple condition values are new ALB features, that are not yet supported. Progress is tracked on #8126

@tolleiv
Copy link
Author

tolleiv commented Apr 15, 2019

Thx @pyranja - I'll close this one then.

@tolleiv tolleiv closed this as completed Apr 15, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
Development

No branches or pull requests

5 participants