Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cloudwatch-logs-aggregator] BREAKING CHANGE: Rollback breaking changes for is_enabled variable #25

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloudwatch-logs-aggregator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module "cw_logs_aggregator_rule_batch_jobs" {
| --- | --- | --- |
| `rule_name` | The name of the EventBridge rule. | |
| `function_arn` | The ARN of the target Lambda function. | |
| `state` | Whether the rules is enabled or not. See [the document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule#state) | `"ENABLED"` |
| `is_enabled` | Whether the rules is enabled or not. | `true` |
| `api_key_name` | The name of the parameter of Parameter Store which stores the Mackerel API key. It is recommended to store the API key as a secure string. | |
| `service_name` | The name of the service on Mackerel to which metrics are posted. | |
| `log_group_name` | The name of the log group to be aggregated. | |
Expand Down
2 changes: 1 addition & 1 deletion cloudwatch-logs-aggregator/rule/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
resource "aws_cloudwatch_event_rule" "this" {
name = var.rule_name
description = "created by mackerel-monitoring-modules"
state = var.state
state = var.is_enabled ? "ENABLED" : "DISABLED"
schedule_expression = var.schedule_expression
}

Expand Down
6 changes: 3 additions & 3 deletions cloudwatch-logs-aggregator/rule/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ variable "rule_name" {
type = string
}

variable "state" {
variable "is_enabled" {
description = "Whether the rules is enabled or not."
type = string
default = "ENABLED"
type = bool
default = true
}

variable "schedule_expression" {
Expand Down
Loading