Skip to content

Commit 8e1c345

Browse files
fix: Step function enrichment (#149)
Co-authored-by: Anton Babenko <[email protected]>
1 parent e3ccd47 commit 8e1c345

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ module "eventbridge" {
341341
create_archives = false # to control creation of EventBridge Archives
342342
create_permissions = false # to control creation of EventBridge Permissions
343343
create_role = false # to control creation of the IAM role and policies required for EventBridge
344+
create_pipe_role_only = false # to control creation of the IAM role and policies required for EventBridge Pipes only
344345
create_connections = false # to control creation of EventBridge Connection resources
345346
create_api_destinations = false # to control creation of EventBridge Destination resources
346347
create_schedule_groups = false # to control creation of EventBridge Schedule Group resources
@@ -496,6 +497,7 @@ No modules.
496497
| <a name="input_create_bus"></a> [create\_bus](#input\_create\_bus) | Controls whether EventBridge Bus resource should be created | `bool` | `true` | no |
497498
| <a name="input_create_connections"></a> [create\_connections](#input\_create\_connections) | Controls whether EventBridge Connection resources should be created | `bool` | `false` | no |
498499
| <a name="input_create_permissions"></a> [create\_permissions](#input\_create\_permissions) | Controls whether EventBridge Permission resources should be created | `bool` | `true` | no |
500+
| <a name="input_create_pipe_role_only"></a> [create\_pipe\_role\_only](#input\_create\_pipe\_role\_only) | Controls whether an IAM role should be created for the pipes only | `bool` | `false` | no |
499501
| <a name="input_create_pipes"></a> [create\_pipes](#input\_create\_pipes) | Controls whether EventBridge Pipes resources should be created | `bool` | `true` | no |
500502
| <a name="input_create_role"></a> [create\_role](#input\_create\_role) | Controls whether IAM roles should be created | `bool` | `true` | no |
501503
| <a name="input_create_rules"></a> [create\_rules](#input\_create\_rules) | Controls whether EventBridge Rule resources should be created | `bool` | `true` | no |

examples/with-pipes/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Note that this example may create resources which cost money. Run `terraform des
5959
| [aws_iam_role_policy_attachment.pipe](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
6060
| [aws_kinesis_firehose_delivery_stream.logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_firehose_delivery_stream) | resource |
6161
| [aws_kinesis_stream.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_stream) | resource |
62+
| [aws_kinesis_stream.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_stream) | resource |
6263
| [aws_sqs_queue.dlq](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
6364
| [aws_sqs_queue.source](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |
6465
| [aws_sqs_queue.target](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | resource |

iam.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
22
create_role = var.create && var.create_role
33
create_pipes = var.create && var.create_pipes
4-
create_role_for_pipes = local.create_pipes && var.create_role
4+
create_role_for_pipes = local.create_pipes && (var.create_role || var.create_pipe_role_only)
55

66
# Defaulting to "*" (an invalid character for an IAM Role name) will cause an error when
77
# attempting to plan if the role_name and bus_name are not set. This is a workaround

iam_pipes.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ locals {
3333
matching_services = ["lambda"]
3434
},
3535
step_functions = {
36-
values = [v.target, try(aws_cloudwatch_event_api_destination.this[v.enrichment].arn, null)],
36+
values = [v.target, try(v.enrichment, null)],
3737
matching_services = ["states"]
3838
},
3939
api_gateway = {

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ resource "aws_pipes_pipe" "this" {
694694

695695
content {
696696
client_certificate_tls_auth = credentials.value.client_certificate_tls_auth
697-
sasl_scram_512_auth = credentials.value.sasl_scram_512_auth
697+
sasl_scram_512_auth = credentials.value.sasl_scram_512_auth
698698
}
699699
}
700700
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ variable "create_role" {
1010
default = true
1111
}
1212

13+
variable "create_pipe_role_only" {
14+
description = "Controls whether an IAM role should be created for the pipes only"
15+
type = bool
16+
default = false
17+
}
18+
1319
variable "append_rule_postfix" {
1420
description = "Controls whether to append '-rule' to the name of the rule"
1521
type = bool

0 commit comments

Comments
 (0)