Skip to content

Commit

Permalink
feat: support http_target argument (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenlito authored Jun 7, 2021
1 parent d303324 commit ee5d963
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ module "eventbridge" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.19 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.40 |

## Providers

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

## Modules

Expand Down
12 changes: 12 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ resource "aws_cloudwatch_event_target" "this" {
}
}

dynamic "http_target" {
for_each = lookup(each.value, "http_target", null) != null ? [
each.value.http_target
] : []

content {
path_parameter_values = lookup(http_target.value, "path_parameter_values", null)
query_string_parameters = lookup(http_target.value, "query_string_parameters", null)
header_parameters = lookup(http_target.value, "header_parameters", null)
}
}

dynamic "input_transformer" {
for_each = lookup(each.value, "input_transformer", null) != null ? [
each.value.input_transformer
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.13.1"

required_providers {
aws = ">= 3.19"
aws = ">= 3.40"
}
}

0 comments on commit ee5d963

Please sign in to comment.