-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add alarms for all IdP LB target groups #773
Conversation
Update the IdP load balancer alarms to include unhealthy host alarms for both the HTTP1 and HTTP2 target groups.
⚠ Terrform update availableTerraform: 1.9.4 (using 1.9.2)
Terragrunt: 0.66.3 (using 0.63.2) |
Staging: idp✅ Terraform Init: Plan: 0 to add, 0 to change, 0 to destroy Show summary
Show planChanges to Outputs:
- lb_idp_target_group_arn_suffix = "targetgroup/idp-tg-HTTP1-56c/9e395afb80e2e462" -> null
+ lb_idp_target_groups_arn_suffix = {
+ HTTP1 = "targetgroup/idp-tg-HTTP1-56c/9e395afb80e2e462"
+ HTTP2 = "targetgroup/idp-tg-HTTP2-56c/2fc9b88fa8660fcb"
}
You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_alb_listener_rule.idp_protocol_version"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_user.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.idp"]
23 tests, 19 passed, 4 warnings, 0 failures, 0 exceptions
|
Staging: alarms✅ Terraform Init: Plan: 2 to add, 0 to change, 1 to destroy Show summary
Show planResource actions are indicated with the following symbols:
+ create
- destroy
Terraform will perform the following actions:
# aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count[0] will be destroyed
# (because resource does not use count)
- resource "aws_cloudwatch_metric_alarm" "idb_lb_unhealthy_host_count" {
- actions_enabled = true -> null
- alarm_actions = [
- "arn:aws:sns:ca-central-1:687401027353:alert-warning",
] -> null
- alarm_description = "IdP ELB Warning - unhealthy host count >= 1 in a 1 minute period" -> null
- alarm_name = "IdP-UnhealthyHostCount" -> null
- arn = "arn:aws:cloudwatch:ca-central-1:687401027353:alarm:IdP-UnhealthyHostCount" -> null
- comparison_operator = "GreaterThanOrEqualToThreshold" -> null
- datapoints_to_alarm = 0 -> null
- dimensions = {
- "LoadBalancer" = "app/idp/9bb4fc6f33420bc4"
- "TargetGroup" = "targetgroup/idp-tg-HTTP1-56c/9e395afb80e2e462"
} -> null
- evaluation_periods = 1 -> null
- id = "IdP-UnhealthyHostCount" -> null
- insufficient_data_actions = [] -> null
- metric_name = "UnHealthyHostCount" -> null
- namespace = "AWS/ApplicationELB" -> null
- ok_actions = [
- "arn:aws:sns:ca-central-1:687401027353:alert-ok",
] -> null
- period = 60 -> null
- statistic = "Maximum" -> null
- tags = {} -> null
- tags_all = {
- "CostCentre" = "forms-platform-staging"
- "Terraform" = "true"
} -> null
- threshold = 1 -> null
- treat_missing_data = "notBreaching" -> null
# (4 unchanged attributes hidden)
}
# aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP1"] will be created
+ resource "aws_cloudwatch_metric_alarm" "idb_lb_unhealthy_host_count" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:ca-central-1:687401027353:alert-warning",
]
+ alarm_description = "IdP ELB Warning - unhealthy HTTP1 host count >= 1 in a 1 minute period"
+ alarm_name = "IdP-UnhealthyHostCount-HTTP1"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ dimensions = {
+ "LoadBalancer" = "app/idp/9bb4fc6f33420bc4"
+ "TargetGroup" = "targetgroup/idp-tg-http1-abc/1234567890123456"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "UnHealthyHostCount"
+ namespace = "AWS/ApplicationELB"
+ ok_actions = [
+ "arn:aws:sns:ca-central-1:687401027353:alert-ok",
]
+ period = 60
+ statistic = "Maximum"
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ threshold = 1
+ treat_missing_data = "notBreaching"
}
# aws_cloudwatch_metric_alarm.idb_lb_unhealthy_host_count["HTTP2"] will be created
+ resource "aws_cloudwatch_metric_alarm" "idb_lb_unhealthy_host_count" {
+ actions_enabled = true
+ alarm_actions = [
+ "arn:aws:sns:ca-central-1:687401027353:alert-warning",
]
+ alarm_description = "IdP ELB Warning - unhealthy HTTP2 host count >= 1 in a 1 minute period"
+ alarm_name = "IdP-UnhealthyHostCount-HTTP2"
+ arn = (known after apply)
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ dimensions = {
+ "LoadBalancer" = "app/idp/9bb4fc6f33420bc4"
+ "TargetGroup" = "targetgroup/idp-tg-http2-abc/1234567890123456"
}
+ evaluate_low_sample_count_percentiles = (known after apply)
+ evaluation_periods = 1
+ id = (known after apply)
+ metric_name = "UnHealthyHostCount"
+ namespace = "AWS/ApplicationELB"
+ ok_actions = [
+ "arn:aws:sns:ca-central-1:687401027353:alert-ok",
]
+ period = 60
+ statistic = "Maximum"
+ tags_all = {
+ "CostCentre" = "forms-platform-staging"
+ "Terraform" = "true"
}
+ threshold = 1
+ treat_missing_data = "notBreaching"
}
Plan: 2 to add, 0 to change, 1 to destroy.
Warning: Argument is deprecated
with module.athena_bucket.aws_s3_bucket.this,
on .terraform/modules/athena_bucket/S3/main.tf line 8, in resource "aws_s3_bucket" "this":
8: resource "aws_s3_bucket" "this" {
Use the aws_s3_bucket_server_side_encryption_configuration resource instead
(and 3 more similar warnings elsewhere)
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_athena_data_catalog.dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_athena_data_catalog.rds_data_catalog"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.codedeploy_sns"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.notify_slack"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ELB_5xx_error_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup1"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.UnHealthyHostCount-TargetGroup2"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.alb_ddos"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_cpu_utilization_high_warn[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_lb_unhealthy_host_count[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_memory_utilization_high_warn[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.api_response_time_warn[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.audit_log_dead_letter_queue_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.cognito_login_outside_canada_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.cognito_signin_exceeded"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ddos_detected_forms_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.ddos_detected_route53_warn[0]"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.forms_cpu_utilization_high_warn"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_metric_alarm.forms_memory_utilization_high_warn"]
WARN - plan.json - main -... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Update the IdP load balancer alarms to include unhealthy host alarms for both the HTTP1 and HTTP2 target groups.
Related