Skip to content

Commit

Permalink
Fix importing without having all resources created
Browse files Browse the repository at this point in the history
  • Loading branch information
alisson276 committed Aug 14, 2022
1 parent 1d5d80c commit 39cb9e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ output "eventbridge_api_destination_arns" {
# EventBridge Rule
output "eventbridge_rule_ids" {
description = "The EventBridge Rule IDs created"
value = { for k in sort(keys(var.rules)) : k => aws_cloudwatch_event_rule.this[k].id if var.create && var.create_rules }
value = { for k in sort(keys(var.rules)) : k => try(aws_cloudwatch_event_rule.this[k].id, null) if var.create && var.create_rules }
}

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

# IAM Role
Expand Down

0 comments on commit 39cb9e9

Please sign in to comment.