Skip to content

Commit ff131eb

Browse files
authored
feat: Add support for EventBridge Pipes (#92)
1 parent c72cd47 commit ff131eb

File tree

15 files changed

+1386
-9
lines changed

15 files changed

+1386
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.81.0
3+
rev: v1.83.4
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

README.md

Lines changed: 30 additions & 1 deletion
Large diffs are not rendered by default.

examples/complete/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Note that this example may create resources which cost money. Run `terraform des
3939
| <a name="module_disabled"></a> [disabled](#module\_disabled) | ../../ | n/a |
4040
| <a name="module_ecs"></a> [ecs](#module\_ecs) | terraform-aws-modules/ecs/aws | ~> 3.0 |
4141
| <a name="module_eventbridge"></a> [eventbridge](#module\_eventbridge) | ../../ | n/a |
42-
| <a name="module_lambda"></a> [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | ~> 2.0 |
42+
| <a name="module_lambda"></a> [lambda](#module\_lambda) | terraform-aws-modules/lambda/aws | ~> 6.0 |
4343
| <a name="module_step_function"></a> [step\_function](#module\_step\_function) | terraform-aws-modules/step-functions/aws | ~> 2.0 |
4444

4545
## Resources
@@ -66,7 +66,18 @@ No inputs.
6666

6767
| Name | Description |
6868
|------|-------------|
69+
| <a name="output_eventbridge_api_destinations"></a> [eventbridge\_api\_destinations](#output\_eventbridge\_api\_destinations) | The EventBridge API Destinations created and their attributes |
70+
| <a name="output_eventbridge_archives"></a> [eventbridge\_archives](#output\_eventbridge\_archives) | The EventBridge Archives created and their attributes |
71+
| <a name="output_eventbridge_bus"></a> [eventbridge\_bus](#output\_eventbridge\_bus) | The EventBridge Bus created and their attributes |
6972
| <a name="output_eventbridge_bus_arn"></a> [eventbridge\_bus\_arn](#output\_eventbridge\_bus\_arn) | The EventBridge Bus ARN |
73+
| <a name="output_eventbridge_connections"></a> [eventbridge\_connections](#output\_eventbridge\_connections) | The EventBridge Connections created and their attributes |
74+
| <a name="output_eventbridge_iam_roles"></a> [eventbridge\_iam\_roles](#output\_eventbridge\_iam\_roles) | The EventBridge IAM roles created and their attributes |
75+
| <a name="output_eventbridge_permissions"></a> [eventbridge\_permissions](#output\_eventbridge\_permissions) | The EventBridge Permissions created and their attributes |
76+
| <a name="output_eventbridge_pipes"></a> [eventbridge\_pipes](#output\_eventbridge\_pipes) | The EventBridge Pipes created and their attributes |
77+
| <a name="output_eventbridge_pipes_iam_roles"></a> [eventbridge\_pipes\_iam\_roles](#output\_eventbridge\_pipes\_iam\_roles) | The EventBridge Pipes IAM roles created and their attributes |
7078
| <a name="output_eventbridge_rule_arns"></a> [eventbridge\_rule\_arns](#output\_eventbridge\_rule\_arns) | The EventBridge Rule ARNs |
7179
| <a name="output_eventbridge_rule_ids"></a> [eventbridge\_rule\_ids](#output\_eventbridge\_rule\_ids) | The EventBridge Rule IDs |
80+
| <a name="output_eventbridge_rules"></a> [eventbridge\_rules](#output\_eventbridge\_rules) | The EventBridge Rules created and their attributes |
81+
| <a name="output_eventbridge_schedule_groups"></a> [eventbridge\_schedule\_groups](#output\_eventbridge\_schedule\_groups) | The EventBridge Schedule Groups created and their attributes |
82+
| <a name="output_eventbridge_schedules"></a> [eventbridge\_schedules](#output\_eventbridge\_schedules) | The EventBridge Schedules created and their attributes |
7283
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

examples/complete/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ provider "aws" {
55
skip_metadata_api_check = true
66
skip_region_validation = true
77
skip_credentials_validation = true
8-
skip_requesting_account_id = true
98
}
109

1110
module "eventbridge" {
@@ -338,7 +337,7 @@ EOF
338337

339338
module "lambda" {
340339
source = "terraform-aws-modules/lambda/aws"
341-
version = "~> 2.0"
340+
version = "~> 6.0"
342341

343342
function_name = "${random_pet.this.id}-lambda"
344343
handler = "index.lambda_handler"

examples/complete/outputs.tf

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,60 @@ output "eventbridge_rule_arns" {
1212
description = "The EventBridge Rule ARNs"
1313
value = module.eventbridge.eventbridge_rule_arns
1414
}
15+
16+
# Resources
17+
output "eventbridge_bus" {
18+
description = "The EventBridge Bus created and their attributes"
19+
value = module.eventbridge.eventbridge_bus
20+
}
21+
22+
output "eventbridge_archives" {
23+
description = "The EventBridge Archives created and their attributes"
24+
value = module.eventbridge.eventbridge_archives
25+
}
26+
27+
output "eventbridge_permissions" {
28+
description = "The EventBridge Permissions created and their attributes"
29+
value = module.eventbridge.eventbridge_permissions
30+
}
31+
32+
output "eventbridge_connections" {
33+
description = "The EventBridge Connections created and their attributes"
34+
value = module.eventbridge.eventbridge_connections
35+
}
36+
37+
output "eventbridge_api_destinations" {
38+
description = "The EventBridge API Destinations created and their attributes"
39+
value = module.eventbridge.eventbridge_api_destinations
40+
}
41+
42+
output "eventbridge_rules" {
43+
description = "The EventBridge Rules created and their attributes"
44+
value = module.eventbridge.eventbridge_rules
45+
}
46+
47+
output "eventbridge_schedule_groups" {
48+
description = "The EventBridge Schedule Groups created and their attributes"
49+
value = module.eventbridge.eventbridge_schedule_groups
50+
}
51+
52+
output "eventbridge_schedules" {
53+
description = "The EventBridge Schedules created and their attributes"
54+
value = module.eventbridge.eventbridge_schedules
55+
}
56+
57+
output "eventbridge_pipes" {
58+
description = "The EventBridge Pipes created and their attributes"
59+
value = module.eventbridge.eventbridge_pipes
60+
}
61+
62+
# IAM Roles
63+
output "eventbridge_pipes_iam_roles" {
64+
description = "The EventBridge Pipes IAM roles created and their attributes"
65+
value = module.eventbridge.eventbridge_pipes_iam_roles
66+
}
67+
68+
output "eventbridge_iam_roles" {
69+
description = "The EventBridge IAM roles created and their attributes"
70+
value = module.eventbridge.eventbridge_iam_roles
71+
}

examples/with-pipes/README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# EventBridge Pipes Example
2+
3+
Configuration in this directory creates EventBridge Pipes in multiple configurations.
4+
5+
## Usage
6+
7+
To run this example you need to execute:
8+
9+
```bash
10+
$ terraform init
11+
$ terraform plan
12+
$ terraform apply
13+
```
14+
15+
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
16+
17+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
## Requirements
19+
20+
| Name | Version |
21+
|------|---------|
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.64 |
24+
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
25+
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
26+
27+
## Providers
28+
29+
| Name | Version |
30+
|------|---------|
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.64 |
32+
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
33+
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |
34+
35+
## Modules
36+
37+
| Name | Source | Version |
38+
|------|--------|---------|
39+
| <a name="module_eventbridge"></a> [eventbridge](#module\_eventbridge) | ../../ | n/a |
40+
| <a name="module_lambda_target"></a> [lambda\_target](#module\_lambda\_target) | terraform-aws-modules/lambda/aws | ~> 6.0 |
41+
| <a name="module_step_function_target"></a> [step\_function\_target](#module\_step\_function\_target) | terraform-aws-modules/step-functions/aws | ~> 2.0 |
42+
43+
## Resources
44+
45+
| Name | Type |
46+
|------|------|
47+
| [aws_cloudwatch_event_api_destination.external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_api_destination) | resource |
48+
| [aws_cloudwatch_event_bus.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_bus) | resource |
49+
| [aws_cloudwatch_event_connection.external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_connection) | resource |
50+
| [aws_cloudwatch_log_group.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
51+
| [aws_cloudwatch_log_stream.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_stream) | resource |
52+
| [aws_dynamodb_table.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table) | resource |
53+
| [aws_iam_role.eventbridge_pipe](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
54+
| [aws_iam_role_policy_attachment.pipe](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
55+
| [aws_kinesis_stream.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_stream) | resource |
56+
| [aws_sqs_queue.dlq](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
57+
| [aws_sqs_queue.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
58+
| [aws_sqs_queue.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
59+
| [null_resource.download_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
60+
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
61+
| [aws_iam_policy_document.assume_role_pipe](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
62+
63+
## Inputs
64+
65+
No inputs.
66+
67+
## Outputs
68+
69+
| Name | Description |
70+
|------|-------------|
71+
| <a name="output_eventbridge_pipe_arns"></a> [eventbridge\_pipe\_arns](#output\_eventbridge\_pipe\_arns) | The EventBridge Pipes ARNs |
72+
| <a name="output_eventbridge_pipe_ids"></a> [eventbridge\_pipe\_ids](#output\_eventbridge\_pipe\_ids) | The EventBridge Pipes IDs |
73+
| <a name="output_eventbridge_pipe_role_arns"></a> [eventbridge\_pipe\_role\_arns](#output\_eventbridge\_pipe\_role\_arns) | The ARNs of the IAM role created for EventBridge Pipes |
74+
| <a name="output_eventbridge_pipe_role_names"></a> [eventbridge\_pipe\_role\_names](#output\_eventbridge\_pipe\_role\_names) | The names of the IAM role created for EventBridge Pipes |
75+
| <a name="output_eventbridge_pipes"></a> [eventbridge\_pipes](#output\_eventbridge\_pipes) | The EventBridge Pipes created and their attributes |
76+
| <a name="output_eventbridge_pipes_iam_roles"></a> [eventbridge\_pipes\_iam\_roles](#output\_eventbridge\_pipes\_iam\_roles) | The EventBridge Pipes IAM roles created and their attributes |
77+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

0 commit comments

Comments
 (0)