Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Remove the still unsupported gce HTTPS healthcheck
Browse files Browse the repository at this point in the history
Currently HTTPS health checks in GCE are part of the GCE beta API and are not
supported by terraform.

There's a [feature request](hashicorp/terraform#2190)
where these possible implementations are discussed:

 1. Alternate resource type: google_compute_https_health_check
 2. Add a new attribute `protocol`

In this commit remove the HTTPS check and use only HTTP on port 8080, for
both the `HTTP/8080` and `HTTPS/443` forwarding rules. The drawbacks are:

 * We don't check the nginx SSL terminator service in the health check.
 * The insecure API must be open, at least for the LB layer.
  • Loading branch information
keymon committed Jun 11, 2015
1 parent 4a63034 commit 1b8a9c7
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions gce/api-servers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,11 @@ resource "google_compute_http_health_check" "api" {
healthy_threshold = "${var.health_check_healthy}"
unhealthy_threshold = "${var.health_check_unhealthy}"
}
resource "google_compute_http_health_check" "api_https" {
name = "${var.env}-tsuru-api-https"
port = 443
request_path = "/info"
check_interval_sec = "${var.health_check_interval}"
timeout_sec = "${var.health_check_timeout}"
healthy_threshold = "${var.health_check_healthy}"
unhealthy_threshold = "${var.health_check_unhealthy}"
}
resource "google_compute_target_pool" "api" {
name = "${var.env}-tsuru-api-lb"
instances = [ "${google_compute_instance.api.*.self_link}" ]
health_checks = [ "${google_compute_http_health_check.api.name}" ]
}
resource "google_compute_target_pool" "api_https" {
name = "${var.env}-tsuru-api-lb-https"
instances = [ "${google_compute_instance.api.*.self_link}" ]
health_checks = [ "${google_compute_http_health_check.api_https.name}" ]
}
resource "google_compute_address" "api" {
name = "${var.env}-tsuru-api-lb"
}
Expand All @@ -58,6 +44,6 @@ resource "google_compute_forwarding_rule" "api" {
resource "google_compute_forwarding_rule" "api_https" {
name = "${var.env}-tsuru-api-lb-https"
ip_address = "${google_compute_address.api.address}"
target = "${google_compute_target_pool.api_https.self_link}"
target = "${google_compute_target_pool.api.self_link}"
port_range = 443
}

0 comments on commit 1b8a9c7

Please sign in to comment.