Skip to content

Commit 8704b42

Browse files
authored
sync(integration): aws-lambda-pagerduty (#6)
FolderOrigin-RevId: /home/runner/work/integrations/integrations/.
1 parent 7735549 commit 8704b42

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
env:
4343
TF_VAR_indent_webhook_secret: ${{ secrets.INDENT_WEBHOOK_SECRET }}
4444
TF_VAR_pagerduty_key: ${{ secrets.PAGERDUTY_KEY }}
45+
TF_VAR_auto_approval_pagerduty_schedules: ${{ secrets.AUTO_APPROVAL_PAGERDUTY_SCHEDULES }}
4546
- uses: actions/github-script@0.9.0
4647
if: github.event_name == 'pull_request'
4748
env:
@@ -73,6 +74,7 @@ jobs:
7374
env:
7475
TF_VAR_indent_webhook_secret: ${{ secrets.INDENT_WEBHOOK_SECRET }}
7576
TF_VAR_pagerduty_key: ${{ secrets.PAGERDUTY_KEY }}
77+
TF_VAR_auto_approval_pagerduty_schedules: ${{ secrets.AUTO_APPROVAL_PAGERDUTY_SCHEDULES }}
7678
- name: Terraform Output
7779
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
7880
run: terraform output

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@ This repository contains an integration between PagerDuty and [Indent](https://i
66

77
## Quicklinks
88

9-
- [Indent Documentation](https://indent.com/docs)
9+
- [Indent Documentation Index](https://indent.com/docs)
1010
- [Indent Support](https://support.indent.com)
1111

12-
**In this repo**
13-
14-
- [GitHub Secrets](./settings/secrets/actions)
15-
- [GitHub Actions](./actions/workflows/deploy.yaml)
16-
1712
## Configuration
1813

1914
Before you deploy these webhooks for the first time, [create an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) to store Terraform state, add your credentials as [GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets), then update the bucket in `main.tf` once you're done.
@@ -47,6 +42,7 @@ Before you deploy these webhooks for the first time, [create an S3 bucket](https
4742

4843
- [Go to PagerDuty > Integrations > API Access Keys](https://support.pagerduty.com/docs/api-access-keys#section-generate-a-general-access-rest-api-key) and create a new API key, then give the key a descriptive name like Indent Auto Approvals
4944
- Add this as `PAGERDUTY_KEY` as a GitHub Secret
45+
- Optional: select which on-call schedules get auto-approval by setting `AUTO_APPROVAL_PAGERDUTY_SCHEDULES` as a GitHub Secret
5046

5147
</details>
5248

main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ terraform {
1010

1111
# Indent + PagerDuty Integration
1212

13-
# Details: https://github.com/indentapis/integrations/tree/1cfcaeb34a36acfe963544635eb971c89ac38d16/packages/stable/indent-integration-pagerduty
14-
# Last Change: https://github.com/indentapis/integrations/commit/1cfcaeb34a36acfe963544635eb971c89ac38d16
13+
# Details: https://github.com/indentapis/integrations/tree/fc629d5c057133dd97e04244485774a57fd10b71/packages/stable/indent-integration-pagerduty
14+
# Last Change: https://github.com/indentapis/integrations/commit/fc629d5c057133dd97e04244485774a57fd10b71
1515

1616
module "idt-pagerduty-webhook" {
1717
source = "git::https://github.com/indentapis/integrations//terraform/modules/indent_runtime_aws_lambda"
1818
name = "idt-pagerduty-webhook"
1919
indent_webhook_secret = var.indent_webhook_secret
2020
artifact = {
2121
bucket = "indent-artifacts-us-west-2"
22-
function_key = "webhooks/aws/lambda/pagerduty-1cfcaeb34a36acfe963544635eb971c89ac38d16-function.zip"
23-
deps_key = "webhooks/aws/lambda/pagerduty-1cfcaeb34a36acfe963544635eb971c89ac38d16-deps.zip"
22+
function_key = "webhooks/aws/lambda/pagerduty-fc629d5c057133dd97e04244485774a57fd10b71-function.zip"
23+
deps_key = "webhooks/aws/lambda/pagerduty-fc629d5c057133dd97e04244485774a57fd10b71-deps.zip"
2424
}
2525
env = {
26-
PAGERDUTY_KEY = var.pagerduty_key
26+
PAGERDUTY_KEY = var.pagerduty_key
27+
AUTO_APPROVAL_PAGERDUTY_SCHEDULES = var.auto_approval_pagerduty_schedules
2728
}
2829
}
2930

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ variable "pagerduty_key" {
1919
sensitive = true
2020
}
2121

22+
variable "auto_approval_pagerduty_schedules" {
23+
type = string
24+
default = ""
25+
sensitive = true
26+
}
27+

0 commit comments

Comments
 (0)