terraform-aws-alb
terraform-aws-alb copied to clipboard
Invalide Attribute Combination
Description
When target group's target type is set to lambda, the following
β Warning: Invalid Attribute Combination
β
β with module.lb["devops-nebula-lambda-alb-1"].aws_lb_target_group.this["lambda-target-group-0"],
β on .terraform/modules/lb/main.tf line 485, in resource "aws_lb_target_group" "this":
β 485: port = try(each.value.target_type, null) == "lambda" ? null : try(each.value.port, var.default_port)
β
β Attribute "port" cannot be specified when "target_type" is "lambda".
- [x ] β I have searched the open/closed issues and my issue is not listed.
β οΈ Note
Versions
-
Module version [Required]: 9.7.0
-
Terraform version: 1.50
-
Provider version(s): . βββ provider[registry.terraform.io/hashicorp/aws] βββ module.gateway_lb β βββ provider[registry.terraform.io/hashicorp/aws] βββ module.lb βββ provider[registry.terraform.io/hashicorp/aws] >= 5.33.0
Reproduction Code [Required]
lambda-target-group-0 = { name_prefix = "l1-" target_type = "lambda" lambda_multi_value_headers_enabled = true target_id = module.lambda_with_allowed_triggers.lambda_function_arn }
Steps to reproduce the behavior:
- define a ALB with target group above
- terraform apply
Got the warning in description