Commit 277a6edc authored by Jamie Kahgee's avatar Jamie Kahgee Committed by Erik Osterman

add cloudwatch ok alarm actions (#32)

* add cloudwatch ok alarm actions

* updating readme from makefile
parent 45eb88f5
...@@ -98,7 +98,6 @@ Available targets: ...@@ -98,7 +98,6 @@ Available targets:
lint Lint terraform code lint Lint terraform code
``` ```
## Inputs ## Inputs
| Name | Description | Type | Default | Required | | Name | Description | Type | Default | Required |
...@@ -122,6 +121,7 @@ Available targets: ...@@ -122,6 +121,7 @@ Available targets:
| name | Name | string | `redis` | no | | name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no | | namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `` | no | | notification_topic_arn | Notification topic arn | string | `` | no |
| ok_actions | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | list | `<list>` | no |
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no | | parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
| port | Redis port | string | `6379` | no | | port | Redis port | string | `6379` | no |
| replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no | | replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no |
......
## Inputs ## Inputs
| Name | Description | Type | Default | Required | | Name | Description | Type | Default | Required |
...@@ -22,6 +21,7 @@ ...@@ -22,6 +21,7 @@
| name | Name | string | `redis` | no | | name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no | | namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `` | no | | notification_topic_arn | Notification topic arn | string | `` | no |
| ok_actions | The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN) | list | `<list>` | no |
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no | | parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
| port | Redis port | string | `6379` | no | | port | Redis port | string | `6379` | no |
| replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no | | replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no |
......
...@@ -92,6 +92,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" { ...@@ -92,6 +92,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
} }
alarm_actions = ["${var.alarm_actions}"] alarm_actions = ["${var.alarm_actions}"]
ok_actions = ["${var.ok_actions}"]
depends_on = ["aws_elasticache_replication_group.default"] depends_on = ["aws_elasticache_replication_group.default"]
} }
...@@ -113,6 +114,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" { ...@@ -113,6 +114,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
} }
alarm_actions = ["${var.alarm_actions}"] alarm_actions = ["${var.alarm_actions}"]
ok_actions = ["${var.ok_actions}"]
depends_on = ["aws_elasticache_replication_group.default"] depends_on = ["aws_elasticache_replication_group.default"]
} }
......
...@@ -103,6 +103,12 @@ variable "alarm_actions" { ...@@ -103,6 +103,12 @@ variable "alarm_actions" {
default = [] default = []
} }
variable "ok_actions" {
type = "list"
description = "The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN)"
default = []
}
variable "apply_immediately" { variable "apply_immediately" {
default = "true" default = "true"
description = "Apply changes immediately" description = "Apply changes immediately"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment