Skip to content

Terraform module that deploys a lambda function which will publish open pull requests to Slack

License

Notifications You must be signed in to change notification settings

plus3it/terraform-aws-codecommit-pr-reminders

Repository files navigation

terraform-aws-codecommit-pr-reminders

Terraform module to deploy a lambda function that will enumerate CodeCommit repositories and publish the Open PRs to slack

Testing

Manual testing:

# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx 
make terraform/pytest PYTEST_ARGS="-v --nomock"

For automated testing, PYTEST_ARGS is optional and no profile is needed:

make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean

Requirements

Name Version
terraform >= 0.12

Providers

Name Version
aws n/a

Resources

Name Type
aws_iam_policy_document.this data source

Inputs

Name Description Type Default Required
hook_url Slack webhook URL; see https://api.slack.com/incoming-webhooks string n/a yes
dry_run toggle to control dryrun output of the lambda function bool false no
lambda Object of optional attributes passed on to the lambda module
object({
artifacts_dir = optional(string, "builds")
build_in_docker = optional(bool, false)
create_package = optional(bool, true)
ephemeral_storage_size = optional(number)
ignore_source_code_hash = optional(bool, true)
local_existing_package = optional(string)
memory_size = optional(number, 128)
recreate_missing_package = optional(bool, false)
runtime = optional(string, "python3.8")
s3_bucket = optional(string)
s3_existing_package = optional(map(string))
s3_prefix = optional(string)
store_on_s3 = optional(bool, false)
timeout = optional(number, 300)
})
{} no
log_level The log level of the lambda function string "INFO" no
name (Optional) Name to associate with the lambda function string "codecommit-pr-reminders" no
schedule (Optional) Schedule expression for CloudWatch event; see https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html string "cron(0 7 ? * MON-FRI *)" no
tags Tags to add to the supported resources map(any) {} no

Outputs

No outputs.