Skip to content
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Available targets:
lint Lint terraform code

```

## Inputs

| Name | Description | Type | Default | Required |
Expand All @@ -122,6 +121,7 @@ Available targets:
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | 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 |
| 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 |
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

## Inputs

| Name | Description | Type | Default | Required |
Expand All @@ -22,6 +21,7 @@
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | 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 |
| 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 |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {
}

alarm_actions = ["${var.alarm_actions}"]
ok_actions = ["${var.ok_actions}"]
depends_on = ["aws_elasticache_replication_group.default"]
}

Expand All @@ -113,6 +114,7 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {
}

alarm_actions = ["${var.alarm_actions}"]
ok_actions = ["${var.ok_actions}"]
depends_on = ["aws_elasticache_replication_group.default"]
}

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ variable "alarm_actions" {
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" {
default = "true"
description = "Apply changes immediately"
Expand Down