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:
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
The first thing we need to do is to get our credentials from the console.