Add memory exceedance alert policy to cloud run module (v1 and v2 variants)
As a DevOps engineer, I would like to include the memory exceedance alert policy in the Cloud Run module (for both v1 and v2 variants), so that the monitoring and alerting configurations are consistent across all services utilizing the Cloud Run infrastructure.
Background
A recent update introduced a memory exceedance metric and an alert policy specifically for the Card Management System within the card.tf file. This setup triggers an alert whenever the memory usage exceeds predefined limits in Cloud Run instances. To maintain consistency and ensure all Cloud Run services have the same level of monitoring and alerting, this functionality should be extended to the Cloud Run module, covering both v1/(v8 module) and v2/(v9 module) variants. This requires two merge requests.
The alert should:
- Be on by default
- Have configuration for:
- Turning the alert on or off (default: on)
- The alert policy & condition names
Acceptance Criteria
-
Configure the google_monitoring_alert_policyresource to monitor the newly created metric in the Cloud Run module (memory exceedance). -
Ensure the alert policy is properly integrated with the notification channels specified in the module. -
Update the documentation to reflect the changes in the Cloud Run module. -
This alert specifically can be turned on an off independently of other alerts.