Skip to content

Terraform module to add alarms based on CPU and Memory Utilization for ECS Services

License

Notifications You must be signed in to change notification settings

alysonfranklin/terraform-aws-alarm-service-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-alarm-service-resources

tflint tfsec tfdoc release GitHub tag (latest by date) License

Example

module "example" {
  source  = "applike/alarm-service-resources/aws"
  version = "X.X.X"
}

Requirements

Name Version
terraform >= 0.14.0

Providers

Name Version
aws n/a

Modules

Name Source Version
short_label applike/label/aws 1.1.0
this applike/label/aws 1.1.0

Resources

Name Type
aws_cloudwatch_metric_alarm.average-resource-cpu resource
aws_cloudwatch_metric_alarm.average-resource-memory resource
aws_cloudwatch_metric_alarm.maximum-resource-cpu resource
aws_cloudwatch_metric_alarm.maximum-resource-memory resource

Inputs

Name Description Type Default Required
additional_tag_map Additional tags for appending to tags_as_list_of_maps. Not added to tags. map(string) {} no
application Solution application, e.g. 'app' or 'jenkins' string null no
attributes Additional attributes (e.g. 1) list(string) [] no
average_resource_cpu_threshold Average of cpu utilization to not be exceeded. Consider keeping some headroom. number 100 no
average_resource_datapoints_to_alarm The number of datapoints that must be breaching to trigger the alarm number 3 no
average_resource_evaluation_periods The number of periods over which data is compared to the specified threshold number 3 no
average_resource_memory_threshold Average of memory utilization to not be exceeded. Consider keeping some headroom. number 100 no
average_resource_period The period in seconds over which the specified statistic is applied number 300 no
context Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as null to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged.
any
{
"additional_tag_map": {},
"application": null,
"attributes": [],
"delimiter": null,
"enabled": true,
"environment": null,
"family": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"project": null,
"regex_replace_chars": null,
"tags": {}
}
no
delimiter Delimiter to be used between project, environment, family, application and attributes.
Defaults to - (hyphen). Set to "" to use no delimiter at all.
string null no
enabled Set to false to prevent the module from creating any resources bool null no
environment Environment, e.g. 'uw2', 'us-west-2', or 'prod', 'staging', 'dev', 'UAT' string null no
family Family, which groups your apps into business domains, e.g. 'monitoring' or 'payment' string null no
id_length_limit Limit id to this many characters (minimum 6).
Set to 0 for unlimited length.
Set to null for default, which is 0.
Does not affect id_full.
number null no
label_key_case The letter case of label keys (tag names) (i.e. name, namespace, environment, stage, attributes) to use in tags.
Possible values: lower, title, upper.
Default value: title.
string null no
label_order The naming order of the id output and Name tag.
Defaults to ["project", "environment", "family", "application", "attributes"].
You can omit any of the 5 elements, but at least one must be present.
list(string) null no
label_value_case The letter case of output label values (also used in tags and id).
Possible values: lower, title, upper and none (no transformation).
Default value: lower.
string null no
maximum_resource_cpu_threshold maximum of cpu utilization to not be exceeded. Consider keeping some headroom. number 150 no
maximum_resource_datapoints_to_alarm The number of datapoints that must be breaching to trigger the alarm number 3 no
maximum_resource_evaluation_periods The number of periods over which data is compared to the specified threshold number 10 no
maximum_resource_memory_threshold maximum of memory utilization to not be exceeded. Consider keeping some headroom. number 150 no
maximum_resource_period The period in seconds over which the specified statistic is applied number 60 no
project Project, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' string null no
regex_replace_chars Regex to replace chars with empty string in project, environment, family and application.
If not set, "/[^a-zA-Z0-9-]/" is used to remove all characters other than hyphens, letters and digits.
string null no
tags Additional tags (e.g. map('BusinessUnit','XYZ') map(string) {} no
treat_missing_data What happens to the alarm if no data points are received. One of 'missing', 'ignore', 'breaching' and 'notBreaching' string "breaching" no

Outputs

No outputs.

About

Terraform module to add alarms based on CPU and Memory Utilization for ECS Services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages