Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 39cb9e9

Browse files
author
Alisson Oliveira
committedAug 14, 2022
Fix importing without having all resources created
1 parent 1d5d80c commit 39cb9e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎outputs.tf

+2-2
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 = { for k in sort(keys(var.rules)) : k => aws_cloudwatch_event_rule.this[k].id if var.create && var.create_rules }
44+
value = { for k in sort(keys(var.rules)) : k => try(aws_cloudwatch_event_rule.this[k].id, null) if var.create && var.create_rules }
4545
}
4646

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

5252
# IAM Role

0 commit comments

Comments
 (0)
Please sign in to comment.