Skip to content

nabeken/terraform-aws-ecs-drain-lambda

Repository files navigation

terraform-aws-ecs-drain-lambda

Pre-Commit

terraform-aws-ecs-drain-lambda is a Terraform module that provisions getsocial-rnd/ecs-drain-lambda.

Prerequisite

You need to place a zip file that contains the ecs-drain-lambda binary as bootstrap into a terraform's working directly before invoking terraform. This is because the module will use provided.al2 runtime instead.

You can find an example script to download the upstream zip file in scripts directly.

Requirements

Name Version
terraform >= 0.13.1
aws >= 3.73

Providers

Name Version
aws >= 3.73

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.catch_all resource
aws_cloudwatch_event_rule.specific resource
aws_cloudwatch_event_target.lambda resource
aws_cloudwatch_log_group.main resource
aws_iam_role.main resource
aws_iam_role_policy.main resource
aws_lambda_alias.main resource
aws_lambda_function.main resource
aws_lambda_permission.allow_events resource
aws_iam_policy_document.assume_role_policy data source
aws_iam_policy_document.main data source

Inputs

Name Description Type Default Required
drain_asg_names Name of Auto Scaling Group that the lambda function reacts. If you don't specify this, the lambda function will react to all of Auto Scaling Group in the account. You can use the comparison operators available in EventBridge. list(any) [] no
event_main_version The version of the Lambda function that receivets the events string "$LATEST" no
prefix A prefix used for the resources created by this module string n/a yes
source_version A version of the upstream release string "1.0.7" no
source_zip A path to custom zip file. You still have to place a zip file in the working directly before invoking terraform. If not specified, terraform will try to locate a zip file based on the source_version variable. string "" no

Outputs

No outputs.