Skip to content

bbl up fails when using --lb-type concourse #701

Done

Description

@sbogar-shs

Error: Invalid Attribute Combination
│
│ Attribute "health_check[0].matcher" cannot be specified when "health_check[0].protocol" is "TCP".
│
│ Path: health_check[0].matcher
│
│ with aws_lb_target_group.concourse_lb_80,
│ on bbl-template.tf line 964, in resource "aws_lb_target_group" "concourse_lb_80":
│ 964: resource "aws_lb_target_group" "concourse_lb_80" {

Something changed in AWS where TCP is no longer a valid entry for the health check on the port 80 target group.

I was able to hack the bbl-terraform.tf file to switch the health check from TCP to HTTP and that got past the issue.

Activity

  1. sbogar-shs commented on Nov 5, 2026

    @sbogar-shs
    ContributorAuthor

    one fix for this is to update the file:
    bosh-bootloader/terraform/aws/templates/concourse_lb.tf
    change the value from TCP to HTTP on the protocol property of the health_check block

    resource "aws_lb_target_group" "concourse_lb_80" {
    name = "${var.short_env_id}-concourse80"
    port = 80
    protocol = "TCP"
    vpc_id = local.vpc_id

    health_check {
    healthy_threshold = 10
    unhealthy_threshold = 10
    interval = 30
    #protocol = "TCP" <-- this is bad combo now
    protocol = "HTTP" <-- this works
    }

    tags = {
    Name = "${var.env_id}"
    }
    }

  2. moved this from Inbox to Waiting for Changes | Open for Contribution in Foundational Infrastructure Working Groupon Nov 12, 2026
  3. sbogar-shs commented on Nov 17, 2026

    @sbogar-shs
    ContributorAuthor

    couple other issues popped up when I ran bbl up today with 9.0.53

    same component is a bit pickier:

    had to add 2 more properties:

    path = "/"
    matcher = "200-499"

    to the health_check block to get past errors.

  4. ramonskie commented on Nov 19, 2026

    @ramonskie
    Contributor

    Thanks for the detailed report and for testing the workarounds — that made this much easier to pin down.

    What's actually failing

    It isn't AWS rejecting TCP health checks. The AWS provider (v3.75.0+) added a plan-time CustomizeDiff that rejects a TCP health check carrying a non-empty matcher or path:

    Attribute "health_check[0].matcher" cannot be specified when "health_check[0].protocol" is "TCP".

    Your generated bbl-template.tf only sets protocol = "TCP", so the matcher/path causing the error come from the target group's state, not from the template.

    Why the state has them

    concourse_lb_80 was HTTP before it was TCP. The 2017 ELB → NLB migration created it in 65dac071 with path = "/" and matcher = "200-399", and no protocol in health_check — the provider at the time defaulted that to HTTP. The very next commit, d2ab1d97 ("Use network load balancers for AWS Concourse LBs"), set protocol = "TCP" and removed path/matcher.

    path and matcher are Optional + Computed, so removing them from the template never cleared the values already on the target group. Long-lived environments kept them in AWS and in state. Provider v3.75.0 then started failing the plan on that combination.

    This is the same trap described upstream in hashicorp/terraform-provider-aws#8305; the path = "" half was relaxed in hashicorp/terraform-provider-aws#46036.

    Fix

    PR #704 restores the HTTP health check on concourse_lb_80 with explicit values:

    health_check {
      ...
      protocol = "HTTP"
      path     = "/"
      matcher  = "200-499"
    }

    That matches what you verified, and writing path/matcher explicitly also overwrites the inherited values, so existing environments converge on the next bbl up. NLB supports HTTP health checks and a configurable matcher range (200–599), so there's no need to keep TCP.

    Workaround until a release

    Edit the …-concourse80 target group in the AWS console to an HTTP health check (/, 200-499) and then run bbl up — the same thing you did in the generated template, just on the target group itself.

    Terraform 1.4.5 is unrelated here: this is provider-side validation during plan, not a CLI version issue.

  5. moved this from Waiting for Changes | Open for Contribution to Done in Foundational Infrastructure Working Groupon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions