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

EOF in aws_lb_listener when ALB is configured with the new "fixed response" option (via AWS console) #5357

Closed
tam116 opened this issue Jul 26, 2018 · 6 comments · Fixed by #5367
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Milestone

Comments

@tam116
Copy link

tam116 commented Jul 26, 2018

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

0.11.7
aws = 1.29,1.27,1.28, and 1.22

Affected Resource(s)

aws_lb_listener_rule

Terraform Configuration Files

resource "aws_lb_listener_rule" "LoadBalancerListener" {
  listener_arn = "${var.ListenerArn}"

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

  condition {
    field  = "host-header"
    values = "${var.values}"
  }

  lifecycle {
    create_before_destroy = true
  }
}

Debug Output

https://gist.github.com/tam116/31d807604ca39d28f8651a96bec82d82

Panic Output

https://gist.github.com/tam116/31d807604ca39d28f8651a96bec82d82

Expected Behavior

Terraform should apply the config. It should ignore the "fixed response" listener rule configured on the ALB when that rule is not managed by terraform. If the rule is managed it should handle setting the rule back to a "forward" (or any other supported listener rule type)

Actual Behavior

Terraform plan fails with EOF errors.

Steps to Reproduce

Manually configure the default ALB rule to be a "fixed response" listener rule via web console of aws cli.
Use terraform to manage a different "forward" rule on the same ALB.

Important Factoids

I did not test against other rule types like Authenticate or Redirect nor setting a non-default rule to fixed response,

References

Details about the new ALB listener rule options: https://aws.amazon.com/about-aws/whats-new/2018/07/elastic-load-balancing-announces-support-for-redirects-and-fixed-responses-for-application-load-balancer/

@junkangli
Copy link

I am facing the same problem when manually configuring the default action to "Redirect".

@bflad
Copy link
Contributor

bflad commented Jul 27, 2018

I'm working on a fix for this, I should be able to submit the pull request shortly.

@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/elbv2 Issues and PRs that pertain to the elbv2 service. labels Jul 27, 2018
@bflad bflad added this to the v1.30.0 milestone Jul 27, 2018
@bflad
Copy link
Contributor

bflad commented Jul 27, 2018

Crash fix pull request submitted: #5367

@bflad
Copy link
Contributor

bflad commented Jul 27, 2018

The fix for this crash has been merged into master and will release with version 1.30.0 of the AWS provider, likely middle of next week.

@bflad
Copy link
Contributor

bflad commented Aug 2, 2018

This has been released in version 1.30.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 4, 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 Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants