Skip to content

[Bug]: aws_lb_target_group resource is warning to not provide value when none was provided #40872

Closed
@camway

Description

Terraform Core Version

1.3.1

AWS Provider Version

5.83.0

Affected Resource(s)

aws_lb_target_group

Expected Behavior

Create the target group with no warnings

Actual Behavior

Warning displayed at the end of the plan

Relevant Error/Panic Output Snippet

│ Warning: Invalid Attribute Combination
│ 
│   with module.firstMod.module.secondMod[0].aws_lb_target_group.tg,
│   on modules/internal_web/main.tf line 64, in resource "aws_lb_target_group" "tg":
│   64: resource "aws_lb_target_group" "tg" {
│ 
│ Attribute "protocol" cannot be specified when "target_type" is "lambda".
│ 
│ This will be an error in a future release.
│ 
│ (and 3 more similar warnings elsewhere)
╵

Terraform Configuration Files

As far as I can tell, this is the only relevant resource:

resource "aws_lb_target_group" "tg" {
  name        = var.name
  target_type = "lambda"
}

Steps to Reproduce

Setup a load balancer and attach a lambda target group to it.

Debug Output

If this turns out to be required, I can try. The output is very long and would take me a while to sanitize

Panic Output

None

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/elbv2Issues and PRs that pertain to the elbv2 service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions