Configures AWS health and account related notifications
This module is used to monitor AWS accounts and send notifications for various events including:
- AWS Backup and Vault Lock lifecycle changes
- AWS Organizations account lifecycle changes
- AWS PHD events
- IAM access analyzer unused permissions/resources findings
- Resources using missing AMIs
- Service Quota limits
Here's what using the module will look like
module "example" {
source = "rhythmictech/rhythmic-account-monitor/aws"
datadog_api_key_secret_arn = ""
}
Rhythmic is an AWS Managed Services Provider. We rely heavily on automation to deliver our services, ingesting configuration, event and state information from AWS via listeners (e.g., EventBridge and SNS), services (e.g., Anomaly Detection), and APIs via custom scripts (e.g., Trusted Advisor).
We open source the vast majority of the resources we use to deliver our managed services because transparency is one of our principles.
Name | Version |
---|---|
terraform | >= 1.5 |
archive | >= 2.5.0 |
aws | >= 5.40 |
Name | Version |
---|---|
archive | 2.5.0 |
aws | 5.62.0 |
Name | Source | Version |
---|---|---|
tags | rhythmictech/tags/terraform | ~> 1.1.1 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
datadog_api_key_secret_arn | ARN of the AWS Secret containing the Datadog API key | string |
n/a | yes |
enable_iam_access_analyzer | A boolean flag to enable/disable IAM Access Analyzer | bool |
false |
no |
enable_iam_access_analyzer_organization | A boolean flag to enable/disable IAM Access Analyzer at the organization level (requires enable_iam_access_analyzer to be true and IAM Access Analyzer to be enabled at the organization level) | bool |
false |
no |
iam_access_analyzer_unused_archive_rules | List of IAM resources to auto-archive unused access findings for | list(object({ |
[] |
no |
iam_analyzer_unused_access_age | The age in days after which IAM access is considered unused. | number |
90 |
no |
name_prefix | Prefix for all resource names | string |
"rhythmic-" |
no |
notify_ec2_missing_ami | Whether to notify when EC2 instances are using missing AMIs | bool |
false |
no |
notify_ec2_missing_ami_if_snapshot_exists | Whether to notify when EC2 instances are using missing AMIs but snapshots exist | bool |
true |
no |
service_quota_region_list | List of regions to monitor for service quotas. Note that you cannot monitor across partitions (e.g. us-east-1 and us-gov-east-1) | list(string) |
[ |
no |
service_quota_threshold | The threshold percentage for service quota alerts | number |
80 |
no |
tags | User-Defined tags | map(string) |
{} |
no |
No outputs.
This workflow has a few prerequisites which are installed through the ./bin/install-x.sh
scripts and are linked below. The install script will also work on your local machine.
We use tfenv
to manage terraform
versions, so the version is defined in the versions.tf
and tfenv
installs the latest compliant version.
pre-commit
is like a package manager for scripts that integrate with git hooks. We use them to run the rest of the tools before apply.
terraform-docs
creates the beautiful docs (above), tfsec
scans for security no-nos, tflint
scans for best practices.