Configures AWS cost anomaly detection and budget services for monitoring
Here's what using the module will look like
module "example" {
source = "rhythmictech/rhythmic-cost-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.2.0 |
aws | >= 4.62 |
Name | Version |
---|---|
archive | 2.4.2 |
aws | 5.36.0 |
Name | Source | Version |
---|---|---|
tags | rhythmictech/tags/terraform | ~> 1.1.1 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
anomaly_cost_monitor_name | Name of Anomaly Detection Cost Monitor | string |
"Rhythmic-DefaultAnomalyMonitor" |
no |
anomaly_cost_subscription_name | Name of Anomaly Detection Cost Subscription | string |
"Rhythmic-DefaultAnomalySubscription" |
no |
anomaly_total_impact_absolute_threshold | Minimum dollar threshold | number |
100 |
no |
anomaly_total_impact_percentage_threshold | Percentage threshold | number |
10 |
no |
aws_service_shorthand_map | Map of shorthand notation for AWS services to their long form AWS services in cost and usage reporting, sorted alphabetically with lowercase keys | map(string) |
{ |
no |
cur_forwarding_bucket_arn | S3 bucket ARN where CUR data will be forwarded | string |
null |
no |
datadog_api_key_secret_arn | ARN of the AWS Secret containing the Datadog API key | string |
n/a | yes |
enable_cur_collection | Enable Cost and Usage Report collection for aggregation in a QuickSight CUDOS project. Be mindful of existing CUR collection processes before enabling. | bool |
false |
no |
enable_datadog_cost_management | Enable Datadog cost management | bool |
false |
no |
expiring_sps_and_ris_alert_exp | Alert expiration threshold for SPs and RIs | number |
7 |
no |
expiring_sps_and_ris_warning_exp | Warning expiration threshold for SPs and RIs | number |
30 |
no |
monitor_ri_utilization | Enable monitoring of Reserved Instances Utilization | bool |
false |
no |
monitor_sp_utilization | Enable monitoring of Savings Plan Utilization | bool |
false |
no |
name_prefix | Prefix for all resource names | string |
"rhythmic-" |
no |
ri_utilization_services | List of services for Reserved Instance utilization monitoring | list(string) |
[ |
no |
service_budgets | Map of service budgets | map(object({ |
{ |
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.