terraform.aws-baseline-infra/modules/ManagementGovernance/Monitoring.ALB
2023-05-23 13:10:16 +08:00
..
list-alb-targetgroups.sh NEW: cloudwatch modules for various resource monitoring 2022-10-25 14:21:37 +08:00
main.tf UPD: backported monitoring modules from customer repo 2023-05-23 13:10:16 +08:00
outputs.tf UPD: backported monitoring modules from customer repo 2023-05-23 13:10:16 +08:00
provider.tf UPD: backported monitoring modules from customer repo 2023-05-23 13:10:16 +08:00
README.md DOC: updated readme with examples 2022-11-10 17:10:45 +08:00
variables.tf UPD: backported monitoring modules from customer repo 2023-05-23 13:10:16 +08:00

Monitoring module

This module deploys the default cloudwatch metric monitoring

Notes

Terraform lifecycle ignores tags to speed up terraform subsequent update. Cloudwatch alarm tags cannot be read on aws console anyway.

Example

module "alb-arns" {
  source        = "../../modules/util/resource-list"
  resource-type = "alb"
}

module "alb-monitoring" {
  for_each                 = toset(split(" ", data.external.alb-arns.result.result))
  source                   = "../../modules/ManagementGovernance/Monitoring.ALB"
  default-tags             = local.default-tags
  load-balancer            = each.value
  threshold-HealthHostCountMin = 1
}