Skip to content

Commit

Permalink
[pr] addressing feedback from @austinbyers
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert committed Sep 8, 2017
1 parent 99eb49c commit d8ae5f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def _add_metric_alarm_subparser(subparsers):
help=ARGPARSE_SUPPRESS
)

# Set the name of this parser to 'validate-schemas'
# Set the name of this parser to 'create-alarm'
metric_alarm_parser.set_defaults(command='create-alarm')

# add all the required parameters
Expand Down
2 changes: 2 additions & 0 deletions stream_alert_cli/terraform_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ def generate_cloudwatch_metric_alarms(cluster_name, cluster_dict, config):
if 'metric_alarms' not in func_config:
continue

# TODO: update this logic to simply use a list of maps once Terraform fixes
# their support for this, instead of the comma-separated string this creates
metric_alarms = func_config['metric_alarms']
for name, alarm_info in metric_alarms.iteritems():
formatted_alarms.append(
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/tf_stream_alert/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ resource "aws_cloudwatch_log_metric_filter" "alert_processor_cw_metric_filters"
// The split list is our way around poor tf support for lists of maps and is made up of:
// <alarm_name>, <alarm_description>, <comparison_operator>, <evaluation_periods>,
// <metric>, <period>, <statistic>, <threshold>
// TODO: update this logic to simply use a variable that is a list of maps once Terraform fixes this
resource "aws_cloudwatch_metric_alarm" "cw_metric_alarms" {
count = "${length(var.metric_alarms)}"
alarm_name = "${element(split(",", var.metric_alarms[count.index]), 0)}"
Expand Down

0 comments on commit d8ae5f4

Please sign in to comment.