Skip to content

Commit 6d8b8d7

Browse files
authoredAug 13, 2021
fix: create_rules = false causes error (terraform-aws-modules#19)
1 parent 906db9f commit 6d8b8d7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎outputs.tf

+2-6
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@ output "eventbridge_permission_ids" {
2424
# EventBridge Rule
2525
output "eventbridge_rule_ids" {
2626
description = "The EventBridge Rule IDs created"
27-
value = {
28-
for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].id
29-
}
27+
value = var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].id } : {}
3028
}
3129

3230
output "eventbridge_rule_arns" {
3331
description = "The EventBridge Rule ARNs created"
34-
value = {
35-
for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].arn
36-
}
32+
value = var.create_rules ? { for p in sort(keys(var.rules)) : p => aws_cloudwatch_event_rule.this[p].arn } : {}
3733
}
3834

3935
# IAM Role

0 commit comments

Comments
 (0)