crossplane-contrib / provider-pagerduty

Apache License 2.0
13 stars 13 forks source link

Cannot create slack connection in a Pagerduty EU tenant #67

Closed fnicolelli-ls closed 3 weeks ago

fnicolelli-ls commented 4 weeks ago

What happened? i've tried to create a Slack connection

apiVersion: slack.pagerduty.crossplane.io/v1alpha1
kind: Connection
metadata:
  annotations:
    crossplane.io/composition-resource-name: pd-slack-test1
  generateName: test-
  labels:
    crossplane.io/composite: test
    service: test1
  name: pd-slack-test1
spec:
  forProvider:
    channelId: REDACTED
    config:
    - events:
      - incident.triggered
      - incident.acknowledged
      - incident.escalated
      - incident.resolved
      - incident.reassigned
      - incident.annotated
      - incident.unacknowledged
      - incident.delegated
      - incident.priority_updated
      - incident.responder.added
      - incident.responder.replied
      - incident.status_update_published
      - incident.reopened
    notificationType: responder
    sourceId: REDACTED
    sourceType: service_reference
    workspaceId: REDACTED
  managementPolicies:
  - '*'
  providerConfigRef:
    name: default

but it was constantly failing due to this error:

No valid credentials found for PagerDuty provider. Please see https://www.terraform.io/docs/providers/pagerduty/index.html
for more information on providing credentials for this provider.

So i've double checked the credential (in this case is a user_token) using the same via postman but it was working properly, then i've notice the fact that i have an EU tenant and according to the terraform pagerduty documentation, the service_region parameter must be set to eu. i didn't found a way to do this via crossplane and i've also tried to set the env variable PAGERDUTY_SERVICE_REGION via DeploymentRuntimeConfig without success.

How can we reproduce it? If you have an EU pagerduty tenant, create a valid user api key (must be issued from a Global Admin or the Owner) then create one Slack connection (apiVersion: slack.pagerduty.crossplane.io/v1alpha1 Kind: Connection)

What environment did it happen in? Crossplane version: 1.17.0 Provider version: 0.8.0 and 0.9.0