Skip to content

Commit

Permalink
fix: adjust alarm toggle variable (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfroembgen authored May 22, 2023
1 parent 61ab68b commit 5f87b09
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Terraform module which creates a kinesis stream including alarms
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
| <a name="input_alarm_create"></a> [alarm\_create](#input\_alarm\_create) | Whether or not to create alarms | `bool` | `true` | no |
| <a name="input_alarm_enabled"></a> [alarm\_enabled](#input\_alarm\_enabled) | Whether or not to create alarms | `bool` | `true` | no |
| <a name="input_alarm_get_records"></a> [alarm\_get\_records](#input\_alarm\_get\_records) | Settings for the get records alarm | <pre>object({<br> create = optional(bool, true)<br> period = optional(number, 60)<br> evaluation_periods = optional(number, 15)<br> alarm_description = optional(string, "This metric monitors kinesis get records successful records (percent)")<br> datapoints_to_alarm = optional(number, 10)<br> threshold_percentage = optional(number, 99)<br> })</pre> | <pre>{<br> "alarm_description": "This metric monitors kinesis get records successful records (percent)",<br> "create": true,<br> "datapoints_to_alarm": 10,<br> "evaluation_periods": 15,<br> "period": 60,<br> "threshold_percentage": 99<br>}</pre> | no |
| <a name="input_alarm_iterator_age_high"></a> [alarm\_iterator\_age\_high](#input\_alarm\_iterator\_age\_high) | Settings for the iterator age high alarm | <pre>object({<br> create = optional(bool, true)<br> period = optional(number, 60)<br> evaluation_periods = optional(number, 15)<br> alarm_description = optional(string, "This metric monitors kinesis iterator age")<br> datapoints_to_alarm = optional(number, 10)<br> threshold_seconds = optional(number, 60)<br> })</pre> | <pre>{<br> "alarm_description": "This metric monitors kinesis iterator age",<br> "create": true,<br> "datapoints_to_alarm": 10,<br> "evaluation_periods": 15,<br> "period": 60,<br> "threshold_seconds": 60<br>}</pre> | no |
| <a name="input_alarm_put_records"></a> [alarm\_put\_records](#input\_alarm\_put\_records) | Settings for the put records alarm | <pre>object({<br> create = optional(bool, true)<br> period = optional(number, 60)<br> evaluation_periods = optional(number, 15)<br> alarm_description = optional(string, "This metric monitors kinesis put records successful records (percent)")<br> datapoints_to_alarm = optional(number, 10)<br> threshold_percentage = optional(number, 99)<br> })</pre> | <pre>{<br> "alarm_description": "This metric monitors kinesis put records successful records (percent)",<br> "create": true,<br> "datapoints_to_alarm": 10,<br> "evaluation_periods": 15,<br> "period": 60,<br> "threshold_percentage": 99<br>}</pre> | no |
Expand Down
2 changes: 1 addition & 1 deletion cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "alarm_label" {

context = module.this.context
label_order = var.label_orders.cloudwatch
enabled = var.alarm_create
enabled = var.alarm_enabled
}

resource "aws_cloudwatch_metric_alarm" "read_bytes_high" {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module "example" {
name = "kinesis"
attributes = ["foo"]

alarm_create = false
alarm_enabled = false
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "alarm_create" {
variable "alarm_enabled" {
type = bool
default = true
description = "Whether or not to create alarms"
Expand Down

0 comments on commit 5f87b09

Please sign in to comment.