Provisioning a three-tier infrastructure on Google Compute Engine
We'll provision a ready to use, three-tier, load-balanced web infrastructure on Google Compute Engine, using two CentOS 7.2 servers for the web and one master Google MySQL instance. The MySQL instance will allow connections only from the two web servers (with valid credentials), and all three instances (SQL and HTTP) will be accessible from a single corporate network (our company's network). The topology looks like this:
Getting ready
To step through this recipe, you will need the following:
- A working Terraform installation
- A Google Compute Engine account with a project
- An Internet connection
How to do it…
The first thing we need to do is to get our credentials from the console.
Generating API credentials for a Google project
Navigate to your Google Cloud project, and in the API Manager, select Credentials | Create credentials | Service Account Key. Now choose Compute Engine default service account from the dropdown...