From 920138a97e88e1c89f2439c737e17060a23f64de Mon Sep 17 00:00:00 2001 From: Josh Sternfeld Date: Tue, 23 Apr 2024 12:47:18 -0400 Subject: [PATCH 1/2] feat: Replace deprecated is_enabled with state in EventBridge rules (#119) * feat: Fixed is_enabled deprecated usage * feat: Fixed is_enabled deprecated usage * Update main.tf Co-authored-by: Anton Babenko * Update main.tf --------- Co-authored-by: Josh Sternfeld Co-authored-by: Anton Babenko --- main.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 10e4aa3..1270098 100644 --- a/main.tf +++ b/main.tf @@ -88,11 +88,10 @@ resource "aws_cloudwatch_event_rule" "this" { event_bus_name = var.create_bus ? aws_cloudwatch_event_bus.this[0].name : var.bus_name description = lookup(each.value, "description", null) - is_enabled = lookup(each.value, "enabled", null) event_pattern = lookup(each.value, "event_pattern", null) schedule_expression = lookup(each.value, "schedule_expression", null) role_arn = lookup(each.value, "role_arn", false) ? aws_iam_role.eventbridge[0].arn : null - state = lookup(each.value, "state", null) + state = try(each.value.enabled ? "ENABLED" : "DISABLED", tobool(each.value.state) ? "ENABLED" : "DISABLED", upper(each.value.state), "DISABLED") tags = merge(var.tags, { Name = each.value.Name From 2f649895225d48d11e00d3480ffd3ef5492e3c19 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 23 Apr 2024 16:48:36 +0000 Subject: [PATCH 2/2] chore(release): version 3.3.0 [skip ci] ## [3.3.0](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/compare/v3.2.4...v3.3.0) (2024-04-23) ### Features * Replace deprecated is_enabled with state in EventBridge rules ([#119](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/issues/119)) ([920138a](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/commit/920138a97e88e1c89f2439c737e17060a23f64de)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e44b42a..d539930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [3.3.0](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/compare/v3.2.4...v3.3.0) (2024-04-23) + + +### Features + +* Replace deprecated is_enabled with state in EventBridge rules ([#119](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/issues/119)) ([920138a](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/commit/920138a97e88e1c89f2439c737e17060a23f64de)) + ## [3.2.4](https://github.com/terraform-aws-modules/terraform-aws-eventbridge/compare/v3.2.3...v3.2.4) (2024-04-05)