Skip to content

highwingio/terraform-aws-event-mapping

Repository files navigation

terraform-aws-event-mapping

Terraform module to map EventBridge bus events to other target resources

Usage

module "event_mapping" {
  source             = "highwingio/event-mapping/aws"
  # Other arguments here...
}

Updating the README

This repo uses terraform-docs to autogenerate its README.

To regenerate, run this command:

$ terraform-docs markdown table . > README.md

Requirements

Name Version
terraform >= 1.4.0
aws >= 5.27

Providers

Name Version
aws 5.51.1

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_api_destination.destination resource
aws_cloudwatch_event_connection.connection resource
aws_cloudwatch_event_rule.event_rule resource
aws_cloudwatch_event_target.event_api resource
aws_cloudwatch_event_target.event_target_with_role resource
aws_cloudwatch_event_target.event_target_without_role resource
aws_iam_role.event_role resource
aws_iam_role_policy.api_events resource
aws_iam_role_policy.bus_events resource
aws_iam_role_policy.sfn_events resource
aws_lambda_permission.permission resource
aws_caller_identity.self data source
aws_iam_policy_document.api_event_invoke data source
aws_iam_policy_document.assume_role_policy data source
aws_iam_policy_document.bus_policy data source
aws_iam_policy_document.sfn_policy data source

Inputs

Name Description Type Default Required
all_events Trigger on any event. Ignores event_patterns if specified. bool false no
allow_accounts Allowed accounts. Will override ignore_accounts if present. list(string) [] no
bus_name Name of the bus to receive events from string n/a yes
enabled Enable or disable the event mapping bool true no
event_patterns Event patterns to listen for on source bus. list(string) [] no
exclude_self Exclude the calling account's events bool false no
filters Filters to apply against the event details. Must be a valid content filter (see docs) map(any) null no
ignore_accounts Ignored accounts. Will be overridden by allow_accounts if present. list(string) [] no
rule_name Unique name to give the event rule. If empty, will use the first event pattern. Required if using all_events string null no
targets Targets to route event to, mapped by target type
object({
lambda = optional(map(string), {})
bus = optional(map(string), {})
sqs = optional(map(string), {})
sfn = optional(map(string), {})
event_api = optional(map(object({
endpoint : string,
token : string,
template_vars = optional(map(string), {}),
template = string,
})), {})
})
n/a yes

Outputs

Name Description
event_rule_arn n/a