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

fix: use events.pagerduty.com for the US integration URL host #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sapslaj
Copy link

@sapslaj sapslaj commented Oct 21, 2024

events.us.pagerduty.com doesn't seem to be a valid hostname for the events API endpoint. The UI and docs all point to events.pagerduty.com being the hostname. Even though events.us.pagerduty.com does seem to resolve, the SSL certificate is invalid.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

`events.us.pagerduty.com` doesn't seem to be a valid hostname for the
events API endpoint. The UI and docs all point to `events.pagerduty.com`
being the hostname. Even though `events.us.pagerduty.com` does seem to
resolve, the SSL certificate is invalid.
@sapslaj sapslaj requested review from a team as code owners October 21, 2024 16:49
@sapslaj
Copy link
Author

sapslaj commented Oct 21, 2024

For anyone who stumbles across this PR with the same issue, there's some intrinsic function spaghetti you can do as a workaround:

!Sub
  - https://events.pagerduty.com/integration/${IntegrationKey}/enqueue
  - IntegrationKey: !Select
      - 4
      - !Split
          - /
          - !GetAtt PagerDutyServiceSubscription.IntegrationUrl

You can also just grab the !Select if you need just the integration key. In CDK, it's a little easier to grok (which is what I'm using instead of CloudFormation directly):

import { CfnResource, Fn, Token } from 'aws-cdk-lib';

// ...

const resource = new CfnResource(this, 'Resource', {
  type: 'PagerDuty::Services::Integration',
  properties: { /* ... */ },
});

const integrationKey = Fn.select(4, Fn.split('/', Token.asString(resource.getAtt('IntegrationUrl'))));
const integrationUrl = `https://events.pagerduty.com/integration/${integrationKey}/enqueue`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant