Skip to content

Monitors the status of RDS instances in an AWS account.

License

Notifications You must be signed in to change notification settings

stefanfreitag/terraform-aws-rds-status-monitor

Repository files navigation

terraform-aws-rds-status-monitor

Terraform Version License

Requirements

Name Version
terraform >= 1.0
archive >=2.4.0
aws >= 5.32.0
random >=3.5.1

Providers

Name Version
archive >=2.4.0
aws >= 5.32.0
random >=3.5.1

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.rds_health_lambda_schedule resource
aws_cloudwatch_event_target.rds_health_lambda_target resource
aws_cloudwatch_log_group.rds_health_lambda_log_groups resource
aws_cloudwatch_metric_alarm.this resource
aws_iam_policy.rds_health_lambda_role_policy resource
aws_iam_role.rds_health_lambda_role resource
aws_iam_role_policy_attachment.rds_health_permissions resource
aws_lambda_function.rds_health_lambda resource
aws_lambda_permission.allow_cw_call_lambda resource
random_id.id resource
archive_file.status_checker_code data source
aws_caller_identity.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
alarm_actions The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN). Default is null. list(string) null no
cloudwatch_alarms_treat_missing_data Sets how the alarms handle missing data points. The following values are supported: missing, ignore, breaching and notBreaching. Default is breaching. string "breaching" no
enable_cloudwatch_alarms Setup CloudWatch alarms for the RDS state. For each state a separate alarm will be created. Default is false. bool false no
ignore_states Suppress warnings for the listed RDS states. Default: ['MAINTENANCE'] list(string)
[
"MAINTENANCE"
]
no
insufficient_data_actions The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN). Default is null. list(string) null no
log_retion_period_in_days Number of days logs will be retained. Default is 365. number 365 no
memory_size Amount of memory in MByte that the Lambda function can use at runtime. Default is 160. number 160 no
ok_actions The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN). list(string) null no
rds_arns List of RDS instance ARNs. Default is []. list(string) [] no
schedule_expression The schedule expression for the CloudWatch event rule. Default is rate(5 minutes). string "rate(5 minutes)" no
tags A map of tags to add to all resources. Default is {}. map(string) {} no

Outputs

Name Description
cloudwatch_metric_alarm_arns A map consisting of RDS instance names and their CloudWatch metric alarm ARNs.
role_arn The ARN of the IAM role.