Skip to content

Commit 277a6ed

Browse files
veilig2000osterman
authored andcommitted
add cloudwatch ok alarm actions (#32)
* add cloudwatch ok alarm actions * updating readme from makefile
1 parent 45eb88f commit 277a6ed

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Available targets:
9898
lint Lint terraform code
9999
100100
```
101-
102101
## Inputs
103102

104103
| Name | Description | Type | Default | Required |
@@ -122,6 +121,7 @@ Available targets:
122121
| name | Name | string | `redis` | no |
123122
| namespace | Namespace | string | `global` | no |
124123
| notification_topic_arn | Notification topic arn | string | `` | no |
124+
| 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 |
125125
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
126126
| port | Redis port | string | `6379` | no |
127127
| 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 |

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Inputs
32

43
| Name | Description | Type | Default | Required |
@@ -22,6 +21,7 @@
2221
| name | Name | string | `redis` | no |
2322
| namespace | Namespace | string | `global` | no |
2423
| notification_topic_arn | Notification topic arn | string | `` | no |
24+
| 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 |
2525
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
2626
| port | Redis port | string | `6379` | no |
2727
| 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 |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
9292
}
9393

9494
alarm_actions = ["${var.alarm_actions}"]
95+
ok_actions = ["${var.ok_actions}"]
9596
depends_on = ["aws_elasticache_replication_group.default"]
9697
}
9798

@@ -113,6 +114,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
113114
}
114115

115116
alarm_actions = ["${var.alarm_actions}"]
117+
ok_actions = ["${var.ok_actions}"]
116118
depends_on = ["aws_elasticache_replication_group.default"]
117119
}
118120

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ variable "alarm_actions" {
103103
default = []
104104
}
105105

106+
variable "ok_actions" {
107+
type = "list"
108+
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)"
109+
default = []
110+
}
111+
106112
variable "apply_immediately" {
107113
default = "true"
108114
description = "Apply changes immediately"

0 commit comments

Comments
 (0)