Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for pubsub channel in alerting module #626

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/alerting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ No modules.
| <a name="input_failure_rate_ratio_threshold"></a> [failure\_rate\_ratio\_threshold](#input\_failure\_rate\_ratio\_threshold) | ratio threshold to alert for cloud run server failure rate. | `number` | `0.2` | no |
| <a name="input_notification_channel_email"></a> [notification\_channel\_email](#input\_notification\_channel\_email) | Email notification channel. | `string` | `""` | no |
| <a name="input_notification_channel_pagerduty"></a> [notification\_channel\_pagerduty](#input\_notification\_channel\_pagerduty) | Email notification channel. | `string` | `""` | no |
| <a name="input_notification_channel_pubsub"></a> [notification\_channel\_pubsub](#input\_notification\_channel\_pubsub) | Pubsub notification channel. | `string` | `""` | no |
| <a name="input_notification_channel_slack"></a> [notification\_channel\_slack](#input\_notification\_channel\_slack) | Slack notification channel. | `string` | `""` | no |
| <a name="input_notification_channels"></a> [notification\_channels](#input\_notification\_channels) | List of notification channels to alert. | `list(string)` | `[]` | no |
| <a name="input_oom_filter"></a> [oom\_filter](#input\_oom\_filter) | additional filter to apply to oom alert policy | `string` | `""` | no |
| <a name="input_panic_filter"></a> [panic\_filter](#input\_panic\_filter) | additional filter to apply to panic alert policy | `string` | `""` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | n/a | `string` | n/a | yes |
| <a name="input_scaling_issue_filter"></a> [scaling\_issue\_filter](#input\_scaling\_issue\_filter) | additional filter to apply to scaling issue alert policy | `string` | `""` | no |
| <a name="input_signal_filter"></a> [signal\_filter](#input\_signal\_filter) | additional filter to apply to signal alert policy | `string` | `""` | no |
| <a name="input_squad"></a> [squad](#input\_squad) | squad to filter on if non-empty | `string` | `""` | no |
| <a name="input_timeout_filter"></a> [timeout\_filter](#input\_timeout\_filter) | additional filter to apply to timeout alert policy | `string` | `""` | no |

## Outputs
Expand Down
6 changes: 4 additions & 2 deletions modules/alerting/main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
locals {
oncall = [
var.notification_channel_pagerduty,
var.notification_channel_email
var.notification_channel_email,
var.notification_channel_pubsub
]

slack = [
var.notification_channel_slack,
var.notification_channel_email
var.notification_channel_email,
var.notification_channel_pubsub
]
}

Expand Down
6 changes: 6 additions & 0 deletions modules/alerting/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ variable "notification_channel_email" {
default = ""
}

variable "notification_channel_pubsub" {
description = "Pubsub notification channel."
type = string
default = ""
}

variable "oom_filter" {
description = "additional filter to apply to oom alert policy"
type = string
Expand Down
Loading