Google Cloud is one of the big players in the public cloud and it provides a comprehensive set of services and features on its Google Cloud Platform (GCP) cloud. In this chapter, we will explore how to automate the provisioning of resources on the GCP cloud using Ansible and how to use the various Ansible modules to orchestrate the building of virtual networks across the GCP cloud.
In this chapter, we will use a simple network setup to illustrate the use of different Ansible modules in building an example network across GCP. The following diagram outlines this sample network that we will build:
This chapter will cover the following recipes:
- Installing the GCP SDK
- Building an Ansible inventory
- Authenticating to your GCP account
- Creating GCP VPC networks
- Creating subnets
- Deploying firewall rules in GCP
- Deploying VMs...