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

chore(pagerduty): Cut over pagerduty to Mozilla SRE #935

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
22 changes: 9 additions & 13 deletions .aws/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {config} from './config';
import {DynamoDB} from "./dynamodb";
import {PocketALBApplication, PocketECSCodePipeline} from "@pocket-tools/terraform-modules";
import {PocketPagerDuty} from "@pocket-tools/terraform-modules";
import {PagerdutyProvider} from "@cdktf/provider-pagerduty";
import {
DataPagerdutyEscalationPolicy,
PagerdutyProvider,
} from "@cdktf/provider-pagerduty";
import {SqsLambda} from "./sqsLambda";
import {Elasticache} from "./elasticache";

Expand Down Expand Up @@ -103,26 +106,19 @@ class RecommendationAPI extends TerraformStack {
}


const incidentManagement = new DataTerraformRemoteState(
const mozillaEscalation = new DataPagerdutyEscalationPolicy(
this,
'incident_management',
'mozilla_sre_escalation_policy',
{
organization: 'Pocket',
workspaces: {
name: 'incident-management'
}
name: 'IT SRE: Escalation Policy'
}
);

return new PocketPagerDuty(this, 'pagerduty', {
prefix: config.prefix,
service: {
criticalEscalationPolicyId: incidentManagement.get(
'policy_data_eng_critical_id'
),
nonCriticalEscalationPolicyId: incidentManagement.get(
'policy_data_eng_non_critical_id'
)
criticalEscalationPolicyId: mozillaEscalation.id,
nonCriticalEscalationPolicyId: mozillaEscalation.id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected that you don't distinguish between critical and non-critical alerts?

}
});
}
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
secrets-manager:
#Pull in the default terraform cloud token
TERRAFORM_TOKEN: 'CodeBuild/Default:terraform_token'
PAGERDUTY_TOKEN: 'CodeBuild/Default:pagerduty_token'
PAGERDUTY_TOKEN: 'CodeBuild/Default:mozilla_pagerduty_token'
GITHUB_ACCESS_TOKEN: 'CodeBuild/Default:github_access_token'

#All phases are ran within the hashicorp/terraform:light docker image
Expand Down