Skip to content

This module will deploy a lambda function which will listen for ebs volume creation/deletion events and put/delete BurstBalance alarms for gp2 volumes.

License

Notifications You must be signed in to change notification settings

StratusGrid/terraform-aws-lambda-event-handler-ebs-burstbalance

Repository files navigation

Contact Us | Stratusphere FinOps | StratusGrid Home | Blog

terraform-aws-lambda-event-handler-ebs-burstbalance

GitHub: StratusGrid/terraform-aws-lambda-event-handler-ebs-burstbalance

This module will deploy a lambda function which will listen for ebs volume creation/deletion events and put/delete BurstBalance alarms for gp2 volumes.

Example:

module "ebs_burst_balance_lambda" {
  source  = "StratusGrid/lambda-event-handler-ebs-burstbalance/aws"
  version = "2.1.0"
  # source  = "github.com/StratusGrid/terraform-aws-lambda-event-handler-ebs-burstbalance"

  region           = var.region
  name_prefix      = var.name_prefix
  name_suffix      = local.name_suffix

  unique_name      = "event-handler-ebs-burst-balance"
  sns_alarm_target = aws_sns_topic.infrastructure_alerts.arn
  input_tags       = merge(local.common_tags, {})
}

Resources

Name Type
aws_cloudwatch_event_rule.event resource
aws_cloudwatch_event_target.function_target resource
aws_cloudwatch_log_group.log_group resource
aws_iam_role.function_role resource
aws_iam_role_policy.function_policy resource
aws_iam_role_policy.function_policy_default resource
aws_kms_key.log_key resource
aws_lambda_function.function resource
aws_lambda_permission.allow_cloudwatch_event_trigger resource

Inputs

Name Description Type Default Required
alarm_period Number of seconds for period value of alarm (Less than 300 will result in 'insufficient data' unless you have detailed monitoring enabled!) string "300" no
alarm_threshold Float value for alarm threshold (e.g. 75.0) string "75.0" no
cloudwatch_log_retention_days Number of days for retention period of Lambda logs string "30" no
input_tags Map of tags to apply to resources map(string)
{
"Developer": "StratusGrid",
"Provisioner": "Terraform"
}
no
kms_log_key_deletion_window Duration (in day) of kms key created, default is 30 number n/a yes
lambda_tracing_option Lambda Tracing option whehter to sample and trace a subset of incoming requests with AWS X-Ray. string "Active" no
name_prefix String to prefix on object names string "" no
name_suffix String to append to object names. This is optional, so start with dash if using string "" no
sns_alarm_target ARN for sns alarm to be targeted for performance alerts string "" no
unique_name Unique string to describe resources. E.g. 'ebs-append' would make (type) string n/a yes

Outputs

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 .

About

This module will deploy a lambda function which will listen for ebs volume creation/deletion events and put/delete BurstBalance alarms for gp2 volumes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published