Modular Internal Load Balancer for GCE using forwarding rules.
module "gce-ilb" {
source = "GoogleCloudPlatform/lb-internal/google"
region = "${var.region}"
name = "group2-ilb"
ports = ["${module.mig2.service_port}"]
health_port = "${module.mig2.service_port}"
source_tags = ["${module.mig1.target_tags}"]
target_tags = ["${module.mig2.target_tags}","${module.mig3.target_tags}"]
backends = [
{ group = "${module.mig2.instance_group}" },
{ group = "${module.mig3.instance_group}" },
]
}google_compute_forwarding_rule.default: The internal regional forwarding rule.google_compute_region_backend_service.default: The backend service registered to the giveninstance_group.google_compute_health_check.default: The TCP health check for theinstance_grouptargets on theservice_port.google_compute_firewall.default-ilb-fw: Firewall rule that allows traffic from thesource_tagsresources totarget_tagson theservice_port.google_compute_firewall.default-hc: Firewall rule that allows traffic for health checks to thetarget_tagsresources.