Modular Regional TCP Load Balancer for GCE using target pool and forwarding rule.
This module is meant for use with Terraform 0.12. If you haven't upgraded and need a Terraform 0.11.x-compatible version of this module, the last released version intended for Terraform 0.11.x is 1.0.3
module "gce-lb-fr" {
source = "GoogleCloudPlatform/lb/google"
region = "${var.region}"
name = "group1-lb"
service_port = "${module.mig1.service_port}"
target_tags = ["${module.mig1.target_tags}"]
}Figure 1. diagram of terraform resources
google_compute_forwarding_rule.default: TCP Forwarding rule to the service port on the instances.google_compute_target_pool.default: The target pool created for the instance group.google_compute_http_health_check.default: The health check for the instance group targeted at the service port.google_compute_firewall.default-lb-fw: Firewall that allows traffic from anywhere to instances service port.
