Skip to content

Commit

Permalink
MARIO-2195 make cloudwatch memory check optional
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnmol committed Jul 23, 2019
1 parent 867d9c4 commit 6e9954c
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/cloudwatch_lambda/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ resource "aws_cloudwatch_metric_alarm" "lambda_memory_alert" {
alarm_actions = ["${var.alarm_action_arn}"]
actions_enabled = "${var.alarm_action_enabled}"
tags = "${local.tags}"
count = "${var.enable_cloudwatch_alarms}"
}
3 changes: 2 additions & 1 deletion apps/cloudwatch_lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ variable "pattern" {
}
variable "alarm_action_enabled" {
default = "true"
}
}
variable "enable_cloudwatch_alarms" {}
3 changes: 2 additions & 1 deletion apps/lambda_function/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module "lambda_app_cloudwatch" {
tags_purpose = "${var.tags_purpose}"
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
3 changes: 3 additions & 0 deletions apps/lambda_function/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,7 @@ variable "lambda_memory_alert_threshold" {

variable "alarm_action_arn" {
default = ""
}
variable "enable_cloudwatch_alarms" {
default = 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,7 @@ variable "swagger_api_key" {

variable "api_gateway_type" {
default = "EDGE"
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,7 @@ variable "swagger_api_key" {

variable "api_gateway_type" {
default = "EDGE"
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module "lambda_app_cloudwatch" {
tags_domain = "${var.tags_domain}"
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,7 @@ variable "swagger_api_key" {

variable "api_gateway_type" {
default = "EDGE"
}
variable "enable_cloudwatch_alarms" {
default = 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,6 @@ variable "swagger_api_key" {
variable "api_gateway_type" {
default = "EDGE"
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
1 change: 1 addition & 0 deletions apps/lambda_function_scheduled_vpc/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module "lambda_app_cloudwatch" {
tags_purpose = "${var.tags_purpose}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
3 changes: 3 additions & 0 deletions apps/lambda_function_scheduled_vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,7 @@ variable "alarm_action_arn" {

variable "retention_days" {
default = "30"
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
1 change: 1 addition & 0 deletions apps/lambda_function_sns/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
3 changes: 3 additions & 0 deletions apps/lambda_function_sns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ variable "reserved_concurrent_executions" {
variable "sns_subscription_filters" {
default = ""
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
1 change: 1 addition & 0 deletions apps/lambda_function_sns_no_vpc/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
3 changes: 3 additions & 0 deletions apps/lambda_function_sns_no_vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,7 @@ variable "reserved_concurrent_executions" {
}
variable "sns_subscription_filters" {
default = ""
}
variable "enable_cloudwatch_alarms" {
default = "1"
}
1 change: 1 addition & 0 deletions apps/lambda_function_sqs_no_vpc/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
1 change: 1 addition & 0 deletions apps/lambda_function_sqs_vpc/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_cost_center = "${var.tags_cost_center}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
1 change: 1 addition & 0 deletions apps/lambda_function_vpc/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module "lambda_app_cloudwatch" {
tags_purpose = "${var.tags_purpose}"
description = "${var.description}"
retention_days = "${var.retention_days}"
enable_cloudwatch_alarms = "${var.enable_cloudwatch_alarms}"
providers = {
aws = "aws"
}
Expand Down
3 changes: 3 additions & 0 deletions apps/lambda_function_vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ variable "alarm_action_arn" {
variable "reserved_concurrent_executions" {
default = -1
}
variable "enable_cloudwatch_alarms" {
default = 1
}

0 comments on commit 6e9954c

Please sign in to comment.