This Terraform module configures Amazon RDS event notifications and forwards them to a Slack channel through a webhook URL. It helps you stay informed about important RDS events for both database instances and clusters.
Check out the blog post about the motivation behind this module: Implementing RDS Event Notification with Terraform
- Monitors RDS instance and cluster events
- Sends notifications to Slack via webhook
- Configurable event categories for both instances and clusters
- Supports multiple RDS instances and clusters
- Uses AWS SNS for reliable message delivery
module "rds_notifications" {
source = "devsecops-studio/rds-event-notification/aws"
name = "rds-notifications"
slack_webhook = var.slack_webhook_url
# RDS instances to monitor
db_instance_ids = ["db-instance-1", "db-instance-2"]
# RDS clusters to monitor
db_cluster_ids = ["db-cluster-1"]
tags = {
Environment = "production"
Terraform = "true"
}
}
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 5.55 |
Name | Version |
---|---|
aws | >= 5.55 |
Name | Source | Version |
---|---|---|
slack_notifier_function | terraform-aws-modules/lambda/aws | 7.7.1 |
Name | Type |
---|---|
aws_db_event_subscription.db_cluster | resource |
aws_db_event_subscription.instances | resource |
aws_sns_topic.this | resource |
aws_sns_topic_subscription.slack_notifier_function | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
create | wheter or not to create resources | bool |
true |
no |
db_cluster_event_categories | List of event categories for RDS cluster instances | list(string) |
[ |
no |
db_cluster_ids | List of RDS cluster instances to monitor | list(string) |
[] |
no |
db_instance_event_categories | List of event categories for RDS instances | list(string) |
[ |
no |
db_instance_ids | List of RDS instances to monitor | list(string) |
[] |
no |
name | Name to apply for created resources | string |
n/a | yes |
slack_webhook | Slack webhook URL | string |
n/a | yes |
tags | n/a | map(string) |
{} |
no |
Name | Description |
---|---|
sns_topic_arn | n/a |