Target_type "alb" on aws_lb_target_group

Hi,

I’m trying to create an aws_lb_target_group with target_type set to alb but it fails on plan :

resource “aws_lb_target_group” “nlb_tg” {

name = “test”
port = 80
protocol = “HTTP”
vpc_id = module.vpc.vpc_id
target_type = “alb”
}

Plan result :

Error: “alb” is an invalid value as target_type (aws_lb_target_group_invalid_target_type)

on nlb.tf line 36:
36: target_type = “alb”

My terraform aws provider is : provider[registry.terraform.io/hashicorp/aws] >= 3.70.0

My terraform cli version is : Terraform v1.1.2

Could you please have a look ? Thx

Documentation includes this note: Application Load Balancers do not support the alb target type..

Yes but it’s not an Application Load Balancers but a network load balancer

Well, then try changing the protocol to something like TCP or TLS.

It wasn’t terraform causing the problem but tfint, my issue is now solved.