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

Undefined var for health_check_path #2

Open
victor-axelsson opened this issue Feb 15, 2024 · 0 comments
Open

Undefined var for health_check_path #2

victor-axelsson opened this issue Feb 15, 2024 · 0 comments

Comments

@victor-axelsson
Copy link

In main.tf the health check needs var.health_check_path but this variable is not specified in variables.tf.

resource "aws_lb_target_group" "target_group" {
  name                  = var.service_name
  port                  = var.container_port
  protocol              = var.alb_target_group_protocol
  target_type           = "ip"
  vpc_id                = var.vpc_id
  deregistration_delay  = var.alb_target_group_deregistration_delay

  health_check {
    enabled             = false
    interval            = var.health_check_interval
    path                = var.health_check_path  # <- Here
    port                = var.container_port
    protocol            = var.health_check_protocol
    timeout             = var.health_check_timeout
    healthy_threshold   = var.health_check_healthy_threshold
    unhealthy_threshold = var.health_check_unhealthy_threshold
    matcher             = var.health_check_matcher
  }
}

Suggestions:

  • Define a variable that defines a default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant