Skip to content

Commit

Permalink
pipes logging configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenbaum committed Jun 8, 2024
1 parent 69af9d6 commit f55774d
Show file tree
Hide file tree
Showing 25 changed files with 94 additions and 50 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ module "eventbridge" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |

## Modules

Expand Down
6 changes: 3 additions & 3 deletions examples/api-gateway-event-source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | terraform-aws-modules/apigateway-v2/aws | ~> 0 |
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | terraform-aws-modules/apigateway-v2/aws | ~> 5.0 |
| <a name="module_apigateway_put_events_to_eventbridge_policy"></a> [apigateway\_put\_events\_to\_eventbridge\_policy](#module\_apigateway\_put\_events\_to\_eventbridge\_policy) | terraform-aws-modules/iam/aws//modules/iam-policy | ~> 4.0 |
| <a name="module_apigateway_put_events_to_eventbridge_role"></a> [apigateway\_put\_events\_to\_eventbridge\_role](#module\_apigateway\_put\_events\_to\_eventbridge\_role) | terraform-aws-modules/iam/aws//modules/iam-assumable-role | ~> 4.0 |
| <a name="module_eventbridge"></a> [eventbridge](#module\_eventbridge) | ../../ | n/a |
Expand Down
33 changes: 17 additions & 16 deletions examples/api-gateway-event-source/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,30 @@ resource "random_pet" "this" {

module "api_gateway" {
source = "terraform-aws-modules/apigateway-v2/aws"
version = "~> 0"
version = "~> 5.0"

name = "${random_pet.this.id}-http"
description = "My ${random_pet.this.id} HTTP API Gateway"
protocol_type = "HTTP"

create_api_domain_name = false
create_domain_name = false

integrations = {
routes = {
"POST /orders/create" = {
integration_type = "AWS_PROXY"
integration_subtype = "EventBridge-PutEvents"
credentials_arn = module.apigateway_put_events_to_eventbridge_role.iam_role_arn

request_parameters = jsonencode({
EventBusName = module.eventbridge.eventbridge_bus_name,
Source = "api.gateway.orders.create",
DetailType = "Order Create",
Detail = "$request.body",
Time = "$context.requestTimeEpoch"
})

payload_format_version = "1.0"
integration = {
type = "AWS_PROXY"
subtype = "EventBridge-PutEvents"
credentials_arn = module.apigateway_put_events_to_eventbridge_role.iam_role_arn

request_parameters = {
EventBusName = module.eventbridge.eventbridge_bus_name,
Source = "api.gateway.orders.create",
DetailType = "Order Create",
Detail = "$request.body",
Time = "$context.requestTimeEpoch"
}
payload_format_version = "1.0"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/api-gateway-event-source/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/default-bus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/default-bus/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-api-destination/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/with-api-destination/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/with-archive/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-ecs-scheduling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/with-ecs-scheduling/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-lambda-scheduling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/with-lambda-scheduling/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
4 changes: 2 additions & 2 deletions examples/with-permissions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion examples/with-permissions/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
5 changes: 3 additions & 2 deletions examples/with-pipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.48 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

Expand All @@ -47,6 +47,7 @@ Note that this example may create resources which cost money. Run `terraform des
| [aws_cloudwatch_event_api_destination.external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_api_destination) | resource |
| [aws_cloudwatch_event_bus.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_bus) | resource |
| [aws_cloudwatch_event_connection.external](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_connection) | resource |
| [aws_cloudwatch_log_group.logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_cloudwatch_log_group.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_cloudwatch_log_stream.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_stream) | resource |
| [aws_dynamodb_table.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table) | resource |
Expand Down
11 changes: 11 additions & 0 deletions examples/with-pipes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ module "eventbridge" {
}
}

log_configuration = {
level = "TRACE"
cloudwatch_logs_log_destination = {
log_group_arn = aws_cloudwatch_log_group.logs.arn
}
}

# target_parameters = {
# # Only supported for target FIFO SQS Queues
# sqs_queue_parameters = {
Expand Down Expand Up @@ -477,3 +484,7 @@ module "step_function_target" {
}
EOF
}

resource "aws_cloudwatch_log_group" "logs" {
name = "${random_pet.this.id}-my-log-group"
}
2 changes: 1 addition & 1 deletion examples/with-pipes/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-schedules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.48 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |

Expand Down
2 changes: 1 addition & 1 deletion examples/with-schedules/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.48"
version = ">= 5.53"
}
random = {
source = "hashicorp/random"
Expand Down
Loading

0 comments on commit f55774d

Please sign in to comment.