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.76k stars 9.11k forks source link

aws_lb_listener #16329

Closed salsop closed 3 years ago

salsop commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform v0.13.4

Affected Resource(s)

Terraform Configuration Files

resource "aws_lb_listener" "gwlb" {
  load_balancer_arn = aws_lb.gwlb.arn
//  port = 6081
  default_action {
    type = "forward"
    target_group_arn = aws_lb_target_group.vmseries.arn
  }
}

Debug Output

Panic Output

Expected Behavior

Create Listener for Gateway Load Balancer

Actual Behavior

With Port Specified:

aws_lb_listener.gwlb: Creating...

Error: error creating ELBv2 Listener: ValidationError: A port cannot be specified for gateway listeners
    status code: 400, request id: c010b6d2-7dab-4f78-a1b9-ffb0f2af0e46

Without Port Specified:

Error: Missing required argument

  on main.tf line 177, in resource "aws_lb_listener" "gwlb":
 177: resource "aws_lb_listener" "gwlb" {

The argument "port" is required, but no definition was found.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

ewbankkit commented 3 years ago

@salsop Thanks for raising this issue. It has already been noticed in #16228. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue. Please add any additional comments there.

ghost commented 3 years ago

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!