Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating LB Target Group: ValidationError: Health check matcher HTTP code cannot be empty #2351

Closed
hashibot opened this issue Nov 17, 2017 · 4 comments

Comments

@hashibot
Copy link

This issue was originally opened by @kwach as hashicorp/terraform#16690. It was migrated here as a result of the provider split. The original body of the issue is below.


Hi there,

Docuentation states that matcher is an optional field, however without it I get an error:

Error creating LB Target Group: ValidationError: Health check matcher HTTP code cannot be empty

Terraform Version

$ terraform --version
Terraform v0.11.0

  • provider.aws v1.3.0
  • provider.null v1.0.0
  • provider.random v1.0.0
  • provider.template v1.0.0

Terraform Configuration Files

resource "aws_alb_target_group" "tg" {
  name     = "tf-tg-${terraform.env}-${element(keys(var.api_service_redirections),count.index)}"
  port     = "${element(values(var.api_service_redirections),count.index)}"
  protocol = "${upper(var.alb_protocol)}"
  vpc_id   = "${module.vpc.vpc_id}"

  health_check {
    interval            = 30
    path                = "/"
    port                = "${var.tg_health_check_port}"
    healthy_threshold   = 3
    unhealthy_threshold = 3
    timeout             = 5
    protocol            = "${upper(var.tg_health_check_protocol)}"
    matcher             = "200,202" #<------
  }
   
  tags = {
    "Terraform" = "true"
    "Environment" = "${terraform.env}"
  } 
  
  count = "${length(keys(var.api_service_redirections))}"
}

Expected Behavior

Optional field should not be required

Actual Behavior

An error:
Error creating LB Target Group: ValidationError: Health check matcher HTTP code cannot be empty

Steps to Reproduce

Please list the full steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform apply
@zikphil
Copy link

zikphil commented Nov 17, 2017

I am experiencing the same issue, it started today

@vecchp
Copy link

vecchp commented Nov 17, 2017

Same here

@catsby
Copy link
Contributor

catsby commented Nov 17, 2017

Hey all – I'm closing this as a duplicate of #2327, please track it there. I'm currently working on this, but I'm afraid I do not have an ETA

@catsby catsby closed this as completed Nov 17, 2017
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants