Skip to content

Commit 87b0ca4

Browse files
authored
sync(integration): aws-lambda-pagerduty (#9)
FolderOrigin-RevId: /home/runner/work/integrations/integrations/.
1 parent 9573b5f commit 87b0ca4

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/workflows/deploy.yaml

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy.webhook
1+
name: deploy
22
on:
33
push:
44
branches:
@@ -8,8 +8,34 @@ on:
88
env:
99
AWS_REGION: us-west-2
1010
jobs:
11+
validate:
12+
name: Validate
13+
runs-on: ubuntu-latest
14+
outputs:
15+
status: ${{ steps.early.outputs.status }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- id: Envcheck
20+
name: Check environment variables
21+
env:
22+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
23+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24+
INDENT_WEBHOOK_SECRET: ${{ secrets.INDENT_WEBHOOK_SECRET }}
25+
run: |
26+
status="deploy"
27+
if [ "$AWS_ACCESS_KEY_ID" == "" ] ||
28+
[ "$AWS_SECRET_ACCESS_KEY" == "" ] ||
29+
[ "$INDENT_WEBHOOK_SECRET" == "" ]
30+
then
31+
status="skip"
32+
echo "Missing required enviroment variable(s)"
33+
fi
34+
echo "status=$status" >> $GITHUB_OUTPUT
1135
terraform:
1236
name: Terraform
37+
needs: validate
38+
if: needs.validate.outputs.status == 'deploy'
1339
runs-on: ubuntu-latest
1440
steps:
1541
- name: Checkout

main.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ terraform {
1010

1111
# Indent + PagerDuty Integration
1212

13-
# Details: https://github.com/indentapis/integrations/tree/72262bbe55f2582bb1f9aa784ceb620d6457ed7b/packages/stable/indent-integration-pagerduty
14-
# Last Change: https://github.com/indentapis/integrations/commit/72262bbe55f2582bb1f9aa784ceb620d6457ed7b
13+
# Details: https://github.com/indentapis/integrations/tree/df7a83d97d7220dc20566871e81d90a20ec160e0/packages/stable/indent-integration-pagerduty
14+
# Last Change: https://github.com/indentapis/integrations/commit/df7a83d97d7220dc20566871e81d90a20ec160e0
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-72262bbe55f2582bb1f9aa784ceb620d6457ed7b-function.zip"
23-
deps_key = "webhooks/aws/lambda/pagerduty-72262bbe55f2582bb1f9aa784ceb620d6457ed7b-deps.zip"
22+
function_key = "webhooks/aws/lambda/pagerduty-df7a83d97d7220dc20566871e81d90a20ec160e0-function.zip"
23+
deps_key = "webhooks/aws/lambda/pagerduty-df7a83d97d7220dc20566871e81d90a20ec160e0-deps.zip"
2424
}
2525
env = {
2626
PAGERDUTY_KEY = var.pagerduty_key

0 commit comments

Comments
 (0)