GCP provides many tools in order to enforce security within the customer environment of the GCP cloud. Firewall rules are one of the most basic security tools supported in GCP in order to implement the first level of defense for all the workloads within a VPC. In this recipe, we will outline how to define and provision firewall rules on the GCP cloud.
Deploying firewall rules in GCP
Getting ready
The Ansible control machine must be connected to the internet with reachability to GCP public API endpoints, and the GCP account should be configured as outlined in the previous recipes. Also, VPC and subnets should be provisioned as outlined in the previous recipes.