This message was deleted.
# yaml
s
This message was deleted.
g
For the first bit, you can add the webhook URL as a secret, something like this
pulumi config set mySecretSlackWebHook --secret
and then reference that variable in the code
s
THank you that worked
the webhook works fine with curl but when I run below pulumi yaml it fails. Any ideas? pulumi:
Copy code
stackWebhook:
    type: pulumiservice:index:Webhook
    properties:
      active: true
      displayName: "#channel-test"
      organizationName: company
      payloadUrl: $SLACK_WEBHOOK_URL
      format: slack
error:
Copy code
+  pulumiservice:index:Webhook stackWebhook creating (1s) error: failed to create webhook: 401 API error: Unauthorized: No credentials provided or are invalid.
+  pulumiservice:index:Webhook stackWebhook **creating failed** error: failed to create webhook: 401 API error: Unauthorized: No credentials provided or are invalid.
Curl test
Copy code
curl -X POST <https://hooks.slack.com/services/>....... \
--header 'Content-Type: application/json' \
--data '{"text": "Hello, world."}'
ok