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

lb_listener_rule not allowing SourceIpConfig with source-ip #8955

Closed
paihu opened this issue Jun 12, 2019 · 2 comments
Closed

lb_listener_rule not allowing SourceIpConfig with source-ip #8955

paihu opened this issue Jun 12, 2019 · 2 comments
Labels
service/elbv2 Issues and PRs that pertain to the elbv2 service.

Comments

@paihu
Copy link

paihu commented Jun 12, 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

Terraform v0.11.13
+ provider.aws v2.13.0

Affected Resource(s)

  • aws_lb_listener_rule

Terraform Configuration Files

resource "aws_lb_listener_rule" "rule_allow" {
  listener_arn = "${var.alb_listener_arn}"

  priority = 1

  action {
    type             = "forward"
    target_group_arn = "${var.target_group_arn}"
  }

  condition {
    field  = "path-pattern"
    values = ["/path/*"]
  }

  condition {
    field = "source-ip"

    source_ip_config = {
      values = [
        "${var.segment_01}",
        "${var.segment_02}",
        "${var.segment_03}",
        "${var.segment_04}",
      ]
    }
  }
}

Expected Behavior

field source-ip allow source_ip_config

Actual Behavior

Error: aws_lb_listener_rule.rule_allow: condition.1.values: attribute supports 1 item maximum, config has 4 declared

Steps to Reproduce

  1. terraform apply

Important Factoids

References

{
    "Rules": [
        {
            "Priority": "1",
            "Conditions": [
                {
                    "SourceIpConfig": {
                        "Values": [
                            "9.9.9.9/32",
                            "1.1.1.1/32",
                            "5.5.5.5/32"
                        ]
                    },
                    "Field": "source-ip"
                }
            ],
            "RuleArn": "arn:aws:elasticloadbalancing:... ",
            "IsDefault": false,
            "Actions": [
                {
                    "Type": "fixed-response",
                    "Order": 1,
                    "FixedResponseConfig": {
                        "ContentType": "text/plain",
                        "MessageBody": "permission denied",
                        "StatusCode": "403"
                    }
                }
            ]
        },
        {
            "Priority": "default",
            "Conditions": [],
            "RuleArn": "arn:aws:elasticloadbalancing:...",
            "IsDefault": true,
            "Actions": [
                {
                    "TargetGroupArn": "arn:aws:elasticloadbalancing:...",
                    "Type": "forward",
                    "Order": 1
                }
            ]
        }
    ]
}
  • #0000
@paihu paihu changed the title lb_listener_rule not allowing multiple values lb_listener_rule not allowing SourceIpConfig with source-ip Jun 13, 2019
@aeschright aeschright added the needs-triage Waiting for first response or review from a maintainer. label Jun 19, 2019
@aeschright aeschright added the service/elbv2 Issues and PRs that pertain to the elbv2 service. label Jul 2, 2019
@paihu
Copy link
Author

paihu commented Dec 19, 2019

This issue fixed by #8268 .
Thank you.

@paihu paihu closed this as completed Dec 19, 2019
@ghost
Copy link

ghost commented Jan 18, 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 Jan 18, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
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

3 participants