Skip to content

Commit

Permalink
feat: Add an ecs_alarm_description variable to be passed to an unde…
Browse files Browse the repository at this point in the history
…rlying module
  • Loading branch information
jbonnier committed Nov 14, 2023
1 parent 74374fa commit 9543c88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ module "ecs_app" {
| <a name="input_delimiter"></a> [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
| <a name="input_descriptor_formats"></a> [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.<br>Map of maps. Keys are names of descriptors. Values are maps of the form<br>`{<br> format = string<br> labels = list(string)<br>}`<br>(Type is `any` so the map values can later be enhanced to provide additional options.)<br>`format` is a Terraform format string to be passed to the `format()` function.<br>`labels` is a list of labels, in order, to pass to `format()` function.<br>Label values will be normalized before being passed to `format()` so they will be<br>identical to how they appear in `id`.<br>Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
| <a name="input_dns_alias_enabled"></a> [dns\_alias\_enabled](#input\_dns\_alias\_enabled) | Create a DNS alias for the CDN. Requires `parent_zone_id` or `parent_zone_name`. | `bool` | `false` | no |
| <a name="input_ecs_alarm_description"></a> [ecs\_alarm\_description](#input\_ecs\_alarm\_description) | The string to format and use as the ECS alarm description. | `string` | `"Average service %v utilization %v last %f minute(s) over %v period(s)"` | no |
| <a name="input_ecs_alarms_cpu_utilization_high_alarm_actions"></a> [ecs\_alarms\_cpu\_utilization\_high\_alarm\_actions](#input\_ecs\_alarms\_cpu\_utilization\_high\_alarm\_actions) | A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High Alarm action. | `list(string)` | `[]` | no |
| <a name="input_ecs_alarms_cpu_utilization_high_evaluation_periods"></a> [ecs\_alarms\_cpu\_utilization\_high\_evaluation\_periods](#input\_ecs\_alarms\_cpu\_utilization\_high\_evaluation\_periods) | Number of periods to evaluate for the alarm. | `number` | `1` | no |
| <a name="input_ecs_alarms_cpu_utilization_high_ok_actions"></a> [ecs\_alarms\_cpu\_utilization\_high\_ok\_actions](#input\_ecs\_alarms\_cpu\_utilization\_high\_ok\_actions) | A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High OK action. | `list(string)` | `[]` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ module "ecs_alarms" {
))
memory_utilization_low_ok_actions = var.ecs_alarms_memory_utilization_low_ok_actions

alarm_description = var.ecs_alarm_description

context = module.this.context
}

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ variable "ecs_alarms_enabled" {
description = "Whether to enable SNS alarms for the ECS service."
}

variable "ecs_alarm_description" {
type = string
default = "Average service %v utilization %v last %f minute(s) over %v period(s)"
description = "The string to format and use as the ECS alarm description."
}

variable "ecs_alarms_cpu_utilization_high_threshold" {
type = number
default = 80
Expand Down

0 comments on commit 9543c88

Please sign in to comment.