Skip to content

Commit

Permalink
Merge pull request #5457 from ministryofjustice/wardship-add-pager-duty
Browse files Browse the repository at this point in the history
add config for Wardship pager duty connection
  • Loading branch information
matthewsearle01 authored Nov 13, 2023
2 parents 08ddf33 + 8c7882b commit 460ed98
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform/pagerduty/aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ resource "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
planetfm_alarms = pagerduty_service_integration.planetfm_cloudwatch.integration_key,
ncas_non_prod_alarms = pagerduty_service_integration.ncas_non_prod_cloudwatch.integration_key,
ncas_prod_alarms = pagerduty_service_integration.ncas_prod_cloudwatch.integration_key,
wardship_non_prod_alarms = pagerduty_service_integration.wardship_non_prod_cloudwatch.integration_key,
wardship_prod_alarms = pagerduty_service_integration.wardship_prod_cloudwatch.integration_key,
})
}

Expand Down
94 changes: 94 additions & 0 deletions terraform/pagerduty/member-services-integrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1202,3 +1202,97 @@ resource "pagerduty_slack_connection" "ncas_prod_connection" {
}

# Slack channel: #cloudwatch_alerts_modernisation_platform_legacy_apps

# Wardship non prod
resource "pagerduty_service" "wardship_non_prod" {
name = "Wardship non prod alarms"
description = "Wardship non prod alarms (preproduction)"
auto_resolve_timeout = 345600
acknowledgement_timeout = "null"
escalation_policy = pagerduty_escalation_policy.member_policy.id
alert_creation = "create_alerts_and_incidents"
}

resource "pagerduty_service_integration" "wardship_non_prod_cloudwatch" {
name = data.pagerduty_vendor.cloudwatch.name
service = pagerduty_service.wardship_non_prod.id
vendor = data.pagerduty_vendor.cloudwatch.id
}

resource "pagerduty_slack_connection" "wardship_non_prod_connection" {
source_id = pagerduty_service.wardship_non_prod.id
source_type = "service_reference"
workspace_id = local.slack_workspace_id
channel_id = "C065VSLNFTJ"
notification_type = "responder"
config {
events = [
"incident.triggered",
"incident.acknowledged",
"incident.escalated",
"incident.resolved",
"incident.reassigned",
"incident.annotated",
"incident.unacknowledged",
"incident.delegated",
"incident.priority_updated",
"incident.responder.added",
"incident.responder.replied",
"incident.action_invocation.created",
"incident.action_invocation.terminated",
"incident.action_invocation.updated",
"incident.status_update_published",
"incident.reopened"
]
priorities = ["*"]
}
}

# Slack channel: #cloudwatch_alerts_modernisation_platform_legacy_apps

# Wardship prod
resource "pagerduty_service" "wardship_prod" {
name = "wardship prod alarms"
description = "wardship prod alarms"
auto_resolve_timeout = 345600
acknowledgement_timeout = "null"
escalation_policy = pagerduty_escalation_policy.member_policy.id
alert_creation = "create_alerts_and_incidents"
}

resource "pagerduty_service_integration" "wardship_prod_cloudwatch" {
name = data.pagerduty_vendor.cloudwatch.name
service = pagerduty_service.wardship_prod.id
vendor = data.pagerduty_vendor.cloudwatch.id
}

resource "pagerduty_slack_connection" "wardship_prod_connection" {
source_id = pagerduty_service.wardship_prod.id
source_type = "service_reference"
workspace_id = local.slack_workspace_id
channel_id = "C065VSLNFTJ"
notification_type = "responder"
config {
events = [
"incident.triggered",
"incident.acknowledged",
"incident.escalated",
"incident.resolved",
"incident.reassigned",
"incident.annotated",
"incident.unacknowledged",
"incident.delegated",
"incident.priority_updated",
"incident.responder.added",
"incident.responder.replied",
"incident.action_invocation.created",
"incident.action_invocation.terminated",
"incident.action_invocation.updated",
"incident.status_update_published",
"incident.reopened"
]
priorities = ["*"]
}
}

# Slack channel: #cloudwatch_alerts_modernisation_platform_legacy_apps

0 comments on commit 460ed98

Please sign in to comment.