# --------------------------------------------------------------------------------------------------------------------- # LAUNCH A NETWORK LOAD BALANCER # --------------------------------------------------------------------------------------------------------------------- terraform { # The modules used in this example have been updated with 0.12 syntax, which means the example is no longer # compatible with any versions below 0.12. required_version = ">= 0.12" } # ------------------------------------------------------------------------------ # CONFIGURE OUR GCP CONNECTION # ------------------------------------------------------------------------------ #provider "google-beta" { # version = "~> 2.7.0" # region = var.region # project = var.project #} # ------------------------------------------------------------------------------ # CREATE THE INTERNAL TCP LOAD BALANCER # ------------------------------------------------------------------------------ module "lb" { # When using these modules in your own templates, you will need to use a Git URL with a ref attribute that pins you # to a specific version of the modules, such as the following example: # source = "github.com/gruntwork-io/terraform-google-load-balancer.git//modules/network-load-balancer?ref=v0.2.0" source = "github.com/gruntwork-io/terraform-google-load-balancer.git//modules/network-load-balancer?ref=v0.2.1" #source = "../../modules/network-load-balancer" name = var.name region = var.region project = var.project enable_health_check = true health_check_port = "6443" health_check_path = "/api" firewall_target_tags = [var.name] # instances = [google_compute_instance.k8s-master.self_link] instances = "${var.gce-vms}" custom_labels = var.custom_labels }