/terraform-google-examples

Collection of examples for using Terraform with Google Cloud Platform.

Primary LanguageHCLApache License 2.0Apache-2.0

Google Cloud Platform Terraform module examples

Collection of examples for using Terraform with Google Cloud Platform.

Clone the repository:

git clone https://github.com/GoogleCloudPlatform/terraform-google-examples.git
cd terraform-google-examples
git submodule init && git submodule update

The example directories are all symlinked to their module subdirectories.

Change to the directory with the example:

cd EXAMPLE_NAME

Follow instructions in the README.md for the example.

Table of Contents

  1. example-lb
  2. example-lb-http
  3. example-lb-https-gke
  4. example-lb-http-nat-gateway
  5. example-lb-https-content
  6. example-lb-https-multiple-certs
  7. example-lb-internal
  8. example-k8s-gce
  9. example-gke-nat-gateway
  10. example-sql-db
  11. example-vault-on-gce
  12. example-gke-k8s-helm
  13. example-gke-k8s-service-lb
  14. example-gke-k8s-multi-region
  15. example-custom-machine-types
  16. example-blue-green-mig-deployment

example-lb

Example showing how to create a TCP load balancer.

button

Figure 1. example-lb diagram

Modules used:

example-lb-http

button

Figure 1. example-lb-http diagram

Modules used:

example-lb-https-gke

button

Figure 1. example-lb-https-gke diagram

Modules used:

example-lb-http-nat-gateway

button

Figure 1. example-lb-http-nat-gateway diagram

Modules used:

example-lb-https-content

button

Figure 1. example-lb-https-content diagram

Modules used:

example-lb-https-multiple-certs

button

Modules used:

example-lb-internal

Figure 1. example-lb-internal diagram

Modules used:

example-k8s-gce-nat-calico

Figure 1. example-k8s-gce-calico diagram

Modules used:

example-k8s-gce-nat-kubenet

Figure 1. example-k8s-gce-kubenet diagram

Modules used:

example-gke-nat-gateway

Figure 1. example-gke-nat-gateway diagram

Modules used:

example-sql-db

Figure 1. example-sql-db diagram

Modules used:

example-vault-on-gce

Figure 1. example-vault-on-gce diagram

Modules used:

example-gke-k8s-helm

Example showing how to deploy Helm releases to GKE from Terraform

button

example-gke-k8s-service-lb

Example showing how to create a Kubernetes Service type LoadBalancer to GKE from Terraform

button

example-gke-k8s-multi-region

Example showing how to create an L7 HTTP load balancer across multiple regional GKE clusters.

button

example-custom-machine-types

button

Example showing how to create custom machine types with bastion host and NAT gateway.

example-blue-green-mig-deployment

button

Example showing how to perform a blue-green deployment with a managed instance group.