🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@wanews/pulumi-pagerduty

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wanews/pulumi-pagerduty

Resources for creating Pagerduty resources, and subscribing them to SNS topics.

latest
Source
npmnpm
Version
1.2.2
Version published
Weekly downloads
4
300%
Maintainers
3
Weekly downloads
 
Created
Source

pulumi-pagerduty

Resources for creating Pagerduty resources, and subscribing them to SNS topics.

Getting started

The PagerDuty provider requires an API Key for authentication. See the [https://www.pulumi.com/docs/intro/cloud-providers/pagerduty/setup/](PagerDuty setup page) for details.

For smaller teams, it may be easier to set the API key using pulumi secrets.

import * as aws from '@pulumi/aws'
import { RecommendedAlarms } from '@wanews/pulumi-lambda'
import {
  PagerdutyService,
  PagerdutySnsTopicSubscription,
} from '@wanews/pulumi-pagerduty'

// create an SNS topic
const topic = new aws.sns.Topic('lambda-alarms', {
  // ...
})

// create a Pagerduty Service
const service = new PagerdutyService('lambda-service', {
  pagerdutyServiceName: 'auth-prd-lambda',
  escalationPolicyId: pagerduty
    .getEscalationPolicy({ name: 'AfterHours' }, { async: true })
    .then((policy) => policy.id)
    .catch((err) => {
      throw new pulumi.ResourceError(err, this)
    }),
})

// add a CloudWatch integration to the Pagerduty Service
const topicSubscription = new PagerdutySnsTopicSubscription('subscription', {
  notificationTopicArn: topic.arn,
  pagerdutyServiceId: service.id,
  cloudwatchVendorName: 'Cloudwatch',
})

// Optional: create cloudwatch metric alarms
const alarms = new RecommendedAlarms('alarms', {
  snsTopicArn: topic.arn,
  // ...
})

Running unit tests

Run nx test pulumi-pagerduty to execute the unit tests via Jest.

Keywords

Pulumi

FAQs

Package last updated on 12 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts