Member-only story

Getting started with Terraform and Google Cloud Platform (GCP) Part 2: deploying VMs in a private-only single region with a load balancer and unmanaged instance groups

--

This is part 2 of the tutorial Getting Started with Terraform and Google Cloud Platform (GCP).

Part 1, deploying VMs in a public-only single region of the tutorial → https://medium.com/@gmusumeci/getting-started-with-terraform-and-google-cloud-platform-gcp-e718017376d1

Part 3, deploying VMs in a private-only single region with a load balancer with autoscaling → https://medium.com/@gmusumeci/getting-started-with-terraform-and-google-cloud-platform-gcp-deploying-vms-in-a-private-only-f8b5ce7858d8

Part 4, deploying a MySQL database instance with a public endpoint → https://medium.com/@gmusumeci/getting-started-with-terraform-and-google-cloud-platform-gcp-deploying-a-mysql-database-f55f3bf57ad3

Part 5, deploying a PostgreSQL database instance with a public endpoint → https://medium.com/@gmusumeci/getting-started-with-terraform-and-google-cloud-platform-gcp-deploying-a-postgresql-database-ce1664fb038c

In this part, we will deploy two Ubuntu virtual machines running the Apache web server located in a private subnet without a public IP address, and we will use a load balancer to publish the web service on the port 80.

When we deploy a public HTTP(S) load balancer, we need to use instance groups to organize instances.

An instance group is a collection of virtual machine (VM) instances that you can manage as a single entity and GCP offers two kinds of VM instance groups, managed and unmanaged:

  • Managed instance groups let you operate apps on multiple identical VMs. You can make your workloads scalable and highly available by taking advantage of autoscaling, autohealing, regional (multiple zones) deployment, and automatic updating. This option requires a virtual machine template.
  • Unmanaged instance groups let you load balance across a fleet of VMs that you manage yourself. This option is good when you have existing VMs and you want to add a load balancer to your infrastructure.

--

--

Guillermo Musumeci
Guillermo Musumeci

Written by Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌

Responses (2)