Skip to content

Commit 08fc230

Browse files
committed
* fix to use step function arn for enrichment
* add variable to allow only pipe role creation
1 parent e3ccd47 commit 08fc230

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

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 ? true : 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 = {

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)