Error creating AutoScaling Group for awsvpc network mode in ECS #5561
Labels
bug
Addresses a defect in current functionality.
service/ecs
Issues and PRs that pertain to the ecs service.
This issue was originally opened by @ssarangkar as hashicorp/terraform#18674. It was migrated here as a result of the provider split. The original body of the issue is below.
Error Message:
Error creating AutoScaling Group: ValidationError: Provided Target Group 'arn:aws:elasticloadbalancing:us-west-2:**********:targetgroup/tf-20180814190421843100000001/4b*****7c2d11872' has invalid target type. Please ensure all provided Target Groups have target type of instance.
ASG Config:
resource "aws_alb_target_group" "layserbeam-web" {
port = 4010
protocol = "HTTP"
target_type = "ip"
vpc_id = "vpc-*****"
lifecycle {
create_before_destroy = true
}
health_check {
path = "/up/elb"
}
tags {
Name = "dr-prod-layserbeam"
}
}
Loadbalancer Config:
resource "aws_alb" "layserbeam-alb" {
name = "dr-layserbeam-ecs-alb"
internal = false
security_groups = ["sg-*****b0c"]
subnets = ["subnet-*****5", "subnet-6*b", "subnet-39"]
enable_deletion_protection = false
}
Task Definition has Network Mode set to awsvpc.
The text was updated successfully, but these errors were encountered: