Skip to content
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

Initial changes #8158

Merged
merged 7 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 45 additions & 43 deletions terraform/pagerduty/aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,54 @@ resource "aws_secretsmanager_secret" "pagerduty_integration_keys" {
resource "aws_secretsmanager_secret_version" "pagerduty_integration_keys" {
secret_id = aws_secretsmanager_secret.pagerduty_integration_keys.id
secret_string = jsonencode({
core_alerts_cloudwatch = pagerduty_service_integration.core_alerts_cloudwatch.integration_key,
ddos_cloudwatch = pagerduty_service_integration.ddos_cloudwatch.integration_key,
tgw_cloudwatch = pagerduty_service_integration.tgw_cloudwatch.integration_key,
networking_cloudwatch = pagerduty_service_integration.networking_cloudwatch.integration_key,
operations_cloudwatch = pagerduty_service_integration.operations_cloudwatch.integration_key,
security_cloudwatch = pagerduty_service_integration.security_cloudwatch.integration_key,
laa_mlra_nonprod_alarms = pagerduty_service_integration.laa_mlra_nonprod_cloudwatch.integration_key,
laa_mlra_prod_alarms = pagerduty_service_integration.laa_mlra_prod_cloudwatch.integration_key,
laa_oas_nonprod_alarms = pagerduty_service_integration.laa_oas_nonprod_cloudwatch.integration_key,
laa_oas_prod_alarms = pagerduty_service_integration.laa_oas_prod_cloudwatch.integration_key,
jitbit_nonprod_alarms = pagerduty_service_integration.jitbit_nonprod_cloudwatch.integration_key,
jitbit_prod_alarms = pagerduty_service_integration.jitbit_prod_cloudwatch.integration_key,
iaps_nonprod_alarms = pagerduty_service_integration.iaps_nonprod_cloudwatch.integration_key,
iaps_prod_alarms = pagerduty_service_integration.iaps_prod_cloudwatch.integration_key,
laa_mojfin_prod_alarms = pagerduty_service_integration.laa_mojfin_prod_cloudwatch.integration_key,
laa_mojfin_non_prod_alarms = pagerduty_service_integration.laa_mojfin_non_prod_cloudwatch.integration_key,
test_alarms = pagerduty_service_integration.test_alarms.integration_key,
laa_portal_nonprod_alarms = pagerduty_service_integration.laa_portal_nonprod_cloudwatch.integration_key,
laa_portal_prod_alarms = pagerduty_service_integration.laa_portal_prod_cloudwatch.integration_key
laa_maat_nonprod_alarms = pagerduty_service_integration.laa_maat_nonprod_cloudwatch.integration_key,
laa_maat_prod_alarm = pagerduty_service_integration.laa_maat_prod_cloudwatch.integration_key,
dpr_nonprod_alarms = pagerduty_service_integration.dpr_nonprod_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,
pra_non_prod_alarms = pagerduty_service_integration.pra_non_prod_cloudwatch.integration_key,
pra_prod_alarms = pagerduty_service_integration.pra_prod_cloudwatch.integration_key,
tipstaff_non_prod_alarms = pagerduty_service_integration.tipstaff_non_prod_cloudwatch.integration_key,
tipstaff_prod_alarms = pagerduty_service_integration.tipstaff_prod_cloudwatch.integration_key,
dacp_non_prod_alarms = pagerduty_service_integration.dacp_non_prod_cloudwatch.integration_key,
dacp_prod_alarms = pagerduty_service_integration.dacp_prod_cloudwatch.integration_key,
laa_maat_api_nonprod_alarms = pagerduty_service_integration.laa_maat_api_nonprod_cloudwatch.integration_key,
laa_maat_api_prod_alarms = pagerduty_service_integration.laa_maat_api_prod_cloudwatch.integration_key,
delius_core_nonprod_alarms = pagerduty_service_integration.delius_core_nonprod_cloudwatch.integration_key
delius_oracle_nonprod_alarms = pagerduty_service_integration.delius_oracle_nonprod_cloudwatch.integration_key
delius_nextcloud_nonprod_alarms = pagerduty_service_integration.delius_nextcloud_nonprod_cloudwatch.integration_key
delius_nextcloud_prod_alarms = pagerduty_service_integration.delius_nextcloud_prod_cloudwatch.integration_key
laa_cwa_nonprod_alarms = pagerduty_service_integration.cwa_non_prod.integration_key
laa_cwa_prod_alarms = pagerduty_service_integration.cwa_prod.integration_key
laa_apex_nonprod_alarms = pagerduty_service_integration.apex_non_prod.integration_key
laa_apex_prod_alarms = pagerduty_service_integration.apex_prod.integration_key
delius_mis_nonprod_alarms = pagerduty_service_integration.delius_mis_non_prod.integration_key
core_alerts_cloudwatch = pagerduty_service_integration.core_alerts_cloudwatch.integration_key,
ddos_cloudwatch = pagerduty_service_integration.ddos_cloudwatch.integration_key,
tgw_cloudwatch = pagerduty_service_integration.tgw_cloudwatch.integration_key,
networking_cloudwatch = pagerduty_service_integration.networking_cloudwatch.integration_key,
operations_cloudwatch = pagerduty_service_integration.operations_cloudwatch.integration_key,
security_cloudwatch = pagerduty_service_integration.security_cloudwatch.integration_key,
laa_mlra_nonprod_alarms = pagerduty_service_integration.laa_mlra_nonprod_cloudwatch.integration_key,
laa_mlra_prod_alarms = pagerduty_service_integration.laa_mlra_prod_cloudwatch.integration_key,
laa_oas_nonprod_alarms = pagerduty_service_integration.laa_oas_nonprod_cloudwatch.integration_key,
laa_oas_prod_alarms = pagerduty_service_integration.laa_oas_prod_cloudwatch.integration_key,
jitbit_nonprod_alarms = pagerduty_service_integration.jitbit_nonprod_cloudwatch.integration_key,
jitbit_prod_alarms = pagerduty_service_integration.jitbit_prod_cloudwatch.integration_key,
iaps_nonprod_alarms = pagerduty_service_integration.iaps_nonprod_cloudwatch.integration_key,
iaps_prod_alarms = pagerduty_service_integration.iaps_prod_cloudwatch.integration_key,
laa_mojfin_prod_alarms = pagerduty_service_integration.laa_mojfin_prod_cloudwatch.integration_key,
laa_mojfin_non_prod_alarms = pagerduty_service_integration.laa_mojfin_non_prod_cloudwatch.integration_key,
test_alarms = pagerduty_service_integration.test_alarms.integration_key,
laa_portal_nonprod_alarms = pagerduty_service_integration.laa_portal_nonprod_cloudwatch.integration_key,
laa_portal_prod_alarms = pagerduty_service_integration.laa_portal_prod_cloudwatch.integration_key
laa_maat_nonprod_alarms = pagerduty_service_integration.laa_maat_nonprod_cloudwatch.integration_key,
laa_maat_prod_alarm = pagerduty_service_integration.laa_maat_prod_cloudwatch.integration_key,
dpr_nonprod_alarms = pagerduty_service_integration.dpr_nonprod_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,
pra_non_prod_alarms = pagerduty_service_integration.pra_non_prod_cloudwatch.integration_key,
pra_prod_alarms = pagerduty_service_integration.pra_prod_cloudwatch.integration_key,
tipstaff_non_prod_alarms = pagerduty_service_integration.tipstaff_non_prod_cloudwatch.integration_key,
tipstaff_prod_alarms = pagerduty_service_integration.tipstaff_prod_cloudwatch.integration_key,
dacp_non_prod_alarms = pagerduty_service_integration.dacp_non_prod_cloudwatch.integration_key,
dacp_prod_alarms = pagerduty_service_integration.dacp_prod_cloudwatch.integration_key,
laa_maat_api_nonprod_alarms = pagerduty_service_integration.laa_maat_api_nonprod_cloudwatch.integration_key,
laa_maat_api_prod_alarms = pagerduty_service_integration.laa_maat_api_prod_cloudwatch.integration_key,
delius_core_nonprod_alarms = pagerduty_service_integration.delius_core_nonprod_cloudwatch.integration_key
delius_oracle_nonprod_alarms = pagerduty_service_integration.delius_oracle_nonprod_cloudwatch.integration_key
delius_nextcloud_nonprod_alarms = pagerduty_service_integration.delius_nextcloud_nonprod_cloudwatch.integration_key
delius_nextcloud_prod_alarms = pagerduty_service_integration.delius_nextcloud_prod_cloudwatch.integration_key
laa_cwa_nonprod_alarms = pagerduty_service_integration.cwa_non_prod.integration_key
laa_cwa_prod_alarms = pagerduty_service_integration.cwa_prod.integration_key
laa_apex_nonprod_alarms = pagerduty_service_integration.apex_non_prod.integration_key
laa_apex_prod_alarms = pagerduty_service_integration.apex_prod.integration_key
# delius_mis_non_prod = pagerduty_event_orchestration_integration.delius_mis_non_prod_integration.parameters[0].routing_key
delius_mis_non_prod = pagerduty_service_integration.delius_mis_non_prod.integration_key
delius_mis_prod_alarms = pagerduty_service_integration.delius_mis_prod.integration_key
laa_edw_nonprod_alarms = pagerduty_service_integration.edw_non_prod.integration_key
laa_edw_prod_alarms = pagerduty_service_integration.edw_prod.integration_key
cdpt_ifs_alarms = pagerduty_event_orchestration_integration.cdpt_ifs_cloudwatch_integration.parameters[0].routing_key
sprinkler_development = pagerduty_event_orchestration_integration.sprinkler_development_integration.parameters[0].routing_key
corporate-staff-rostering-preproduction = pagerduty_service_integration.integrations["corporate-staff-rostering-preproduction"].integration_key
corporate-staff-rostering-production = pagerduty_service_integration.integrations["corporate-staff-rostering-production"].integration_key
Expand Down
17 changes: 15 additions & 2 deletions terraform/pagerduty/member-services-integrations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,20 @@ resource "pagerduty_service" "delius_mis_non_prod" {
alert_creation = "create_alerts_and_incidents"
}

# resource "pagerduty_event_orchestration" "delius_mis_non_prod" {
# name = "delius_mis_non_prod integration"
# description = "Integrates delius_mis_non_prod account with PagerDuty"
# team = pagerduty_team.modernisation_platform.id
# }
resource "pagerduty_service_integration" "delius_mis_non_prod" {
name = data.pagerduty_vendor.cloudwatch.name
service = pagerduty_service.delius_mis_non_prod.id
vendor = data.pagerduty_vendor.cloudwatch.id
}

# resource "pagerduty_event_orchestration_integration" "delius_mis_non_prod_integration" {
# event_orchestration = pagerduty_event_orchestration.delius_mis_non_prod.id
# label = "delius_mis_non_prod development"
# }
resource "pagerduty_slack_connection" "delius_mis_non_prod" {
source_id = pagerduty_service.delius_mis_non_prod.id
source_type = "service_reference"
Expand Down Expand Up @@ -1802,11 +1810,16 @@ resource "pagerduty_service" "cdpt-ifs" {
}

resource "pagerduty_event_orchestration" "cdpt_ifs_cloudwatch" {
name = "cdpt_ifs_cloudwatch orchestration integration"
name = "cdpt_ifs_cloudwatch orchestration"
description = "Integrates with PagerDuty"
team = pagerduty_team.modernisation_platform_members.id
}

resource "pagerduty_event_orchestration_integration" "cdpt_ifs_cloudwatch_integration" {
event_orchestration = pagerduty_event_orchestration.cdpt_ifs_cloudwatch.id
label = "CDPT IFS CloudWatch Integration"
}

resource "pagerduty_slack_connection" "ifs_slack" {
source_id = pagerduty_service.cdpt-ifs.id
source_type = "service_reference"
Expand Down