Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 6a35a5f

Browse files
committed
Change alarm_action_arn to list. Correct readme examples.
1 parent 9c68c12 commit 6a35a5f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Terraform module that creates AWS CloudWatch metric filter and alarm
33

44
## Usage
5-
```hcl-terraform
5+
```hcl
66
module "my_metric_filter_alarm" {
7-
source = "dwp/terraform-aws-metric-filter-alarm"
7+
source = "dwp/metric-filter-alarm/aws"
88
99
log_group_name = "MyLogGroup"
1010
metric_namespace = "MyMetricNamespace"
@@ -14,7 +14,7 @@ module "my_metric_filter_alarm" {
1414
```
1515
## Examples
1616
The following example creates a CloudWatch Log Group, Alarm and SNS Topic. The Alarm monitors the Log Group for "ERROR" and if there are more than five occurrences within one hour the Alarm will go into an "ALARM" state and a notification will be sent to the SNS Topic
17-
```hcl-terraform
17+
```hcl
1818
1919
resource "aws_cloudwatch_log_group" "MyLogGroup" {
2020
name = "MyLogGroup"
@@ -26,7 +26,7 @@ resource "aws_sns_topic" "MyTopic" {
2626
}
2727
2828
module "my_metric_filter_alarm" {
29-
source = "dwp/terraform-aws-metric-filter-alarm"
29+
source = "dwp/metric-filter-alarm/aws"
3030
3131
log_group_name = "${aws_cloudwatch_log_group.MyLogGroup.name}"
3232
metric_namespace = "MyMetricNamespace"

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ resource "aws_cloudwatch_metric_alarm" "metric_alarm" {
1818
period = "${var.period}"
1919
threshold = "${var.threshold}"
2020
statistic = "${var.statistic}"
21-
alarm_actions = "${var.alarm_action_arns != "" ? var.alarm_action_arns : ""}"
21+
alarm_actions = "${var.alarm_action_arns}"
2222
}

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ variable "metric_filter_name" {
2525
}
2626

2727
variable "alarm_action_arns" {
28-
type = "string"
28+
type = "list"
2929
description = "The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Number (ARN)"
30-
default = ""
30+
default = []
3131
}
3232

3333
variable "comparison_operator" {

0 commit comments

Comments
 (0)