Skip to content

Commit 3dcc882

Browse files
authored
fix: Fixed outputs when create=false (terraform-aws-modules#33)
1 parent 685cd69 commit 3dcc882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ output "eventbridge_api_destination_arns" {
4141
# EventBridge Rule
4242
output "eventbridge_rule_ids" {
4343
description = "The EventBridge Rule IDs created"
44-
value = var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].id } : {}
44+
value = var.create && var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].id } : {}
4545
}
4646

4747
output "eventbridge_rule_arns" {
4848
description = "The EventBridge Rule ARNs created"
49-
value = var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].arn } : {}
49+
value = var.create && var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].arn } : {}
5050
}
5151

5252
# IAM Role

0 commit comments

Comments
 (0)