Skip to content

Commit

Permalink
fix: Problems found when importing resources previously already creat…
Browse files Browse the repository at this point in the history
…ed (#61)
  • Loading branch information
alisson276 authored Sep 8, 2022
1 parent 8728c2a commit 015122e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ resource "aws_iam_policy" "additional_json" {
count = local.create_role && var.attach_policy_json ? 1 : 0

name = local.role_name
path = var.role_path
policy = var.policy_json
}

Expand Down
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 015122e

Please sign in to comment.