Skip to content

Commit

Permalink
feat: replace deprecated is_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfreitagrwe authored and stefanfreitag committed Apr 27, 2024
1 parent f730f9a commit 883b011
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ This module deploys a Lambda function that checks the health of MSK cluster and
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_archive"></a> [archive](#requirement\_archive) | >=2.4.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.32 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >=3.5.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_archive"></a> [archive](#provider\_archive) | >=2.4.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.32 |

## Modules

Expand Down
4 changes: 2 additions & 2 deletions examples/01_default_configuration/versions.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
required_version = "~>1.5"
required_version = "~>1.8"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~>5.0"
version = "~>5.32"
}
}
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ resource "aws_cloudwatch_event_rule" "this" {
name = var.name
description = "Scheduled execution of the MSK monitor"
schedule_expression = var.schedule_expression
is_enabled = true
state = "ENABLED"
tags = var.tags
}

Expand Down
9 changes: 9 additions & 0 deletions tests/defaults.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ run "eventbridge_default_schedule_expression" {
}
}

run "eventbridge_default_is_enabled" {
command = plan

assert {
condition = aws_cloudwatch_event_rule.this.state == "ENABLED"
error_message = "CloudWatch EventBride rule state is not matching state of ENABLED"
}
}

##
# The default value for CloudWatch Alarm property treat_missing_data should be set to breaching.
##
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terraform {
}
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
version = ">= 5.32"
}
random = {
source = "hashicorp/random"
Expand Down

0 comments on commit 883b011

Please sign in to comment.