diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f57ddf..6faeb9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +### [1.14.3](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/compare/v1.14.2...v1.14.3) (2022-09-08) + + +### Bug Fixes + +* Problems found when importing resources previously already created ([#61](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/issues/61)) ([015122e](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/commit/015122e9a7204ef35b7812781e076d861d5945b5)) + ### [1.14.2](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/compare/v1.14.1...v1.14.2) (2022-07-28) diff --git a/iam.tf b/iam.tf index c7f97a4..20f89f0 100644 --- a/iam.tf +++ b/iam.tf @@ -347,6 +347,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 tags = merge(var.tags, { Name = local.role_name }) diff --git a/outputs.tf b/outputs.tf index ef9abea..1a5e6b4 100644 --- a/outputs.tf +++ b/outputs.tf @@ -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