github.com/candidpartners/terraform@v0.9.5-0.20171005231213-29f5f88820f6/examples/google-internal-load-balancing/README.md (about)

     1  # Internal Load Balancing in Google Cloud
     2  
     3  This provides a template for setting up internal load balancing in Google Cloud. It directly mirrors the tutorial in the [GCP Internal Load Balancing Documentation](https://cloud.google.com/compute/docs/load-balancing/internal/).
     4  
     5  To run the example,
     6  
     7  * Log in to gcloud with an account that has permission to create the necessary resources using `gcloud init`.
     8  * Optionally update `variables.tf` to specify a default value for the `project_name` variable, and check other variables.
     9  * Run with a command like this:
    10  
    11  ```
    12  terraform apply \
    13  	-var="region=us-central1" \
    14  	-var="region_zone=us-central1-b" \
    15  	-var="region_zone_2=us-central1-c" \
    16  	-var="project_name=my-project-id-123" \
    17  ```
    18  
    19  
    20  After you run `terraform apply` on this configuration, it will
    21  automatically output the internal IP address of the load balancer.
    22  
    23  Since the load balancer is only reachable from within the network, ssh into the standalone instance using
    24  
    25  ```
    26  gcloud compute ssh --zone us-central1-b standalone-instance-1
    27  ```
    28  
    29  
    30  Using `curl` on the IP address given, the LB should respond with a simple header:
    31  
    32  ```html
    33  <!doctype html><html><body><h1>ilb-instance-X</h1></body></html>
    34  ```