To create the automated alerts when a user creates an instance outside our region of choice (us-west1), we'll need to perform two steps. Firstly, we'll have to create custom metric to identify the breach event. Next, we'll create an alerting policy in Stackdriver Monitoring to send us a notification when the conditions of the custom metric are met:
- Navigate to the Stackdriver Logging in the GCP Console.
- In the resource dropdown, select GCE VM Instance, which will show us all logs related to VMs:
- From the drop-down, ...