Professional Cloud Security Engineer
Prepare and test your skills
Prepare and test your skills
This section is about using code and automation to manage security consistently across your Google Cloud environment. Instead of manually configuring each resource, you define your security requirements—like network rules, IAM policies, and data encryption—in code using tools like Terraform or Deployment Manager. This code is then executed to create and update your infrastructure. This approach ensures that every new environment is built exactly the same, which prevents mistakes and "configuration drift" where settings accidentally change over time. It also allows you to quickly roll back to a known secure state if a problem is discovered.
Automation extends to the applications themselves through CI/CD pipelines. Security checks can be automatically integrated into the software build and deployment process. For example, before an application is deployed, the pipeline can scan the container image for known vulnerabilities or check that the code doesn't contain hard-coded secrets. This shifts security "left" in the development cycle, meaning issues are found and fixed early, rather than after the software is already running in production. The pipeline acts as an automated gatekeeper, enforcing security policies for every single change.
This area focuses on collecting data about activity in your cloud projects and using that data to spot security issues. The foundation is Cloud Logging, which automatically captures logs from Google Cloud services, virtual machines, and applications. You control what gets logged and for how long it is retained. To monitor for specific conditions, you use Cloud Monitoring, which lets you create alerts based on metrics (like failed login attempts) or log patterns (like a specific error message). These alerts notify your team so they can investigate potential incidents.
Effective detection relies on setting up the right logs and alerts from the start. Key logs to enable include Audit Logs for all administrative actions, VPC Flow Logs for network traffic analysis, and DNS Logs. You then write queries in Cloud Logging to search these logs for suspicious patterns, such as access from an unexpected location or a user making unusual API calls. The relationship is clear: logs provide the raw data, queries analyze that data, and alerts trigger a response when the analysis finds something that matches a rule you've defined. This creates a continuous feedback loop for security oversight.

A process flow showing a code commit built by Cloud Build, stored in Artifact Registry, scanned for CVEs by Container Analysis, and checked by a severity gate before deployment to GKE or Cloud Run. The animation traces the image through each stage, then shows a failed build looping back to the developer to fix issues early (shift left).

A process flow showing a container image being built in Cloud Build, scanned for CVEs by Artifact Analysis, signed by an attestor, and stored as an attestation in Container Analysis. At deploy time, the Binary Authorization policy checks the attestation and either permits deployment to GKE or Cloud Run or blocks unattested images; the animation lights up each step in order as a token moves through the pipeline.
Infrastructure as code defines security requirements such as network rules, IAM policies, and data encryption in code that is executed to create and update infrastructure. This ensures every new environment is built exactly the same, preventing mistakes and configuration drift, and allows quick rollback to a known secure state.
The CI/CD pipeline acts as an automated gatekeeper that enforces security policies for every change. It can scan container images for known vulnerabilities and check for hard-coded secrets before deployment, shifting security left so issues are found and fixed early rather than after the software is running in production.
Key logs to enable include Audit Logs for all administrative actions, VPC Flow Logs for network traffic analysis, and DNS Logs. These logs provide the raw data that you query in Cloud Logging to find suspicious patterns such as access from an unexpected location or unusual API calls.
Cloud Logging captures logs from Google Cloud services, VMs, and applications, while Cloud Monitoring lets you create alerts based on metrics or log patterns. Logs provide raw data, queries analyze that data, and alerts trigger a response when a rule-defined condition is matched, creating a continuous feedback loop for security oversight.