Contact Us | Stratusphere FinOps | StratusGrid Home | Blog
GitHub: StratusGrid/terraform-aws-anomaly-detection-alerts
This terraform module uses AWS Cloudformation under the hood to create AWS Cost Anomaly Detection monitors and subscriptions.
This repo has several base requirements
tflint
, terrascan
, terraform-docs
, gitleaks
, tfsec
, pre-commit
, tfsec
bash
through Brew for Bash 5.0, otherwise it will fail with the error that looks like declare: -g: invalid option
.tflint.hcl
file with the instructions from hereThis repo has been tested with awsume
See the pre-commit tfsec documentation here, this includes on how to bypass warnings
#Verify you have bash5
brew install bash
# Test your pre-commit hooks - This will force them to run on all files
pre-commit run --all-files
# Add your pre-commit hooks forever
pre-commit install
module "aws_anomaly_detection_alerts" {
source = "StratusGrid/anomaly-detection-alerts/aws"
version = "3.0.0"
input_tags = merge(local.common_tags, {})
cost_threshold = 100 # This is a sample of 100
subscription_email = "mygroup@example.com" # This is the email to send the billing alert to
}
Name | Version |
---|---|
terraform | ~> 1.1 |
aws | >= 4.20.0 |
Name | Type |
---|---|
aws_ce_anomaly_monitor.this | resource |
aws_ce_anomaly_subscription.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cost_threshold | Defines the amount in the account currency before AWS sends an email to the subscriber(s) that an anomaly was detected. | number |
n/a | yes |
enable_cost_anomaly_detection | Boolean to enable or disable Cost Explorer Anomaly Detection monitor and subscription. | bool |
true |
no |
input_tags | Map of tags to apply to resources | map(string) |
{ |
no |
subscription_email | This is the email address that gets notified when an anomaly is detected. | string |
n/a | yes |
No outputs.
Note, manual changes to the README will be overwritten when the documentation is updated. To update the documentation, run terraform-docs -c .config/.terraform-docs.yml