pulumiservice.Webhook

Explore with Pulumi AI

Pulumi Webhooks allow you to notify external services of events happening within your Pulumi organization or stack. For example, you can trigger a notification whenever a stack is updated. Whenever an event occurs, Pulumi will send an HTTP POST request to all registered webhooks. The webhook can then be used to emit some notification, start running integration tests, or even update additional stacks.

Import

Pulumi webhooks can be imported using the id, which for webhooks is {org}/{project}/{stack}/{webhook-name} e.g.,

 $ pulumi import pulumiservice:index:Webhook my_webhook my-org/my-project/my-stack/4b0d0671

Create Webhook Resource

new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
@overload
def Webhook(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            display_name: Optional[str] = None,
            filters: Optional[Sequence[WebhookFilters]] = None,
            format: Optional[WebhookFormat] = None,
            organization_name: Optional[str] = None,
            payload_url: Optional[str] = None,
            project_name: Optional[str] = None,
            secret: Optional[str] = None,
            stack_name: Optional[str] = None)
@overload
def Webhook(resource_name: str,
            args: WebhookArgs,
            opts: Optional[ResourceOptions] = None)
func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
public Webhook(String name, WebhookArgs args)
public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
type: pulumiservice:Webhook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args WebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args WebhookArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args WebhookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args WebhookArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Webhook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Webhook resource accepts the following input properties:

Active bool

Indicates whether this webhook is enabled or not.

DisplayName string

The friendly name displayed in the Pulumi Service.

OrganizationName string

Name of the organization.

PayloadUrl string

URL to send request to.

Filters List<Pulumi.PulumiService.WebhookFilters>

Optional set of filters to apply to the webhook. See webhook docs for more information.

Format Pulumi.PulumiService.WebhookFormat

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

ProjectName string

Name of the project. Only needed if this is a stack webhook.

Secret string

Optional. secret used as the HMAC key. See webhook docs for more information.

StackName string

Name of the stack. Only needed if this is a stack webhook.

Active bool

Indicates whether this webhook is enabled or not.

DisplayName string

The friendly name displayed in the Pulumi Service.

OrganizationName string

Name of the organization.

PayloadUrl string

URL to send request to.

Filters []WebhookFilters

Optional set of filters to apply to the webhook. See webhook docs for more information.

Format WebhookFormat

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

ProjectName string

Name of the project. Only needed if this is a stack webhook.

Secret string

Optional. secret used as the HMAC key. See webhook docs for more information.

StackName string

Name of the stack. Only needed if this is a stack webhook.

active Boolean

Indicates whether this webhook is enabled or not.

displayName String

The friendly name displayed in the Pulumi Service.

organizationName String

Name of the organization.

payloadUrl String

URL to send request to.

filters List<WebhookFilters>

Optional set of filters to apply to the webhook. See webhook docs for more information.

format WebhookFormat

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

projectName String

Name of the project. Only needed if this is a stack webhook.

secret String

Optional. secret used as the HMAC key. See webhook docs for more information.

stackName String

Name of the stack. Only needed if this is a stack webhook.

active boolean

Indicates whether this webhook is enabled or not.

displayName string

The friendly name displayed in the Pulumi Service.

organizationName string

Name of the organization.

payloadUrl string

URL to send request to.

filters WebhookFilters[]

Optional set of filters to apply to the webhook. See webhook docs for more information.

format WebhookFormat

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

projectName string

Name of the project. Only needed if this is a stack webhook.

secret string

Optional. secret used as the HMAC key. See webhook docs for more information.

stackName string

Name of the stack. Only needed if this is a stack webhook.

active bool

Indicates whether this webhook is enabled or not.

display_name str

The friendly name displayed in the Pulumi Service.

organization_name str

Name of the organization.

payload_url str

URL to send request to.

filters Sequence[WebhookFilters]

Optional set of filters to apply to the webhook. See webhook docs for more information.

format WebhookFormat

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

project_name str

Name of the project. Only needed if this is a stack webhook.

secret str

Optional. secret used as the HMAC key. See webhook docs for more information.

stack_name str

Name of the stack. Only needed if this is a stack webhook.

active Boolean

Indicates whether this webhook is enabled or not.

displayName String

The friendly name displayed in the Pulumi Service.

organizationName String

Name of the organization.

payloadUrl String

URL to send request to.

filters List<"stack_created" | "stack_deleted" | "update_succeeded" | "update_failed" | "preview_succeeded" | "preview_failed" | "destroy_succeeded" | "destroy_failed" | "refresh_succeeded" | "refresh_failed" | "deployment_queued" | "deployment_started" | "deployment_succeeded" | "deployment_failed">

Optional set of filters to apply to the webhook. See webhook docs for more information.

format "raw" | "slack"

Format of the webhook payload. Can be either raw or slack. Defaults to raw.

projectName String

Name of the project. Only needed if this is a stack webhook.

secret String

Optional. secret used as the HMAC key. See webhook docs for more information.

stackName String

Name of the stack. Only needed if this is a stack webhook.

Outputs

All input properties are implicitly available as output properties. Additionally, the Webhook resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

Webhook identifier generated by pulumi service.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Webhook identifier generated by pulumi service.

id String

The provider-assigned unique ID for this managed resource.

name String

Webhook identifier generated by pulumi service.

id string

The provider-assigned unique ID for this managed resource.

name string

Webhook identifier generated by pulumi service.

id str

The provider-assigned unique ID for this managed resource.

name str

Webhook identifier generated by pulumi service.

id String

The provider-assigned unique ID for this managed resource.

name String

Webhook identifier generated by pulumi service.

Supporting Types

WebhookFilters

StackCreated
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

StackDeleted
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

UpdateSucceeded
update_succeeded

Trigger a webhook when a stack update succeeds.

UpdateFailed
update_failed

Trigger a webhook when a stack update fails.

PreviewSucceeded
preview_succeeded

Trigger a webhook when a stack preview succeeds.

PreviewFailed
preview_failed

Trigger a webhook when a stack preview fails.

DestroySucceeded
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

DestroyFailed
destroy_failed

Trigger a webhook when a stack destroy fails.

RefreshSucceeded
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

RefreshFailed
refresh_failed

Trigger a webhook when a stack refresh fails.

DeploymentQueued
deployment_queued

Trigger a webhook when a deployment is queued.

DeploymentStarted
deployment_started

Trigger a webhook when a deployment starts running.

DeploymentSucceeded
deployment_succeeded

Trigger a webhook when a deployment succeeds.

DeploymentFailed
deployment_failed

Trigger a webhook when a deployment fails.

WebhookFiltersStackCreated
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

WebhookFiltersStackDeleted
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

WebhookFiltersUpdateSucceeded
update_succeeded

Trigger a webhook when a stack update succeeds.

WebhookFiltersUpdateFailed
update_failed

Trigger a webhook when a stack update fails.

WebhookFiltersPreviewSucceeded
preview_succeeded

Trigger a webhook when a stack preview succeeds.

WebhookFiltersPreviewFailed
preview_failed

Trigger a webhook when a stack preview fails.

WebhookFiltersDestroySucceeded
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

WebhookFiltersDestroyFailed
destroy_failed

Trigger a webhook when a stack destroy fails.

WebhookFiltersRefreshSucceeded
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

WebhookFiltersRefreshFailed
refresh_failed

Trigger a webhook when a stack refresh fails.

WebhookFiltersDeploymentQueued
deployment_queued

Trigger a webhook when a deployment is queued.

WebhookFiltersDeploymentStarted
deployment_started

Trigger a webhook when a deployment starts running.

WebhookFiltersDeploymentSucceeded
deployment_succeeded

Trigger a webhook when a deployment succeeds.

WebhookFiltersDeploymentFailed
deployment_failed

Trigger a webhook when a deployment fails.

StackCreated
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

StackDeleted
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

UpdateSucceeded
update_succeeded

Trigger a webhook when a stack update succeeds.

UpdateFailed
update_failed

Trigger a webhook when a stack update fails.

PreviewSucceeded
preview_succeeded

Trigger a webhook when a stack preview succeeds.

PreviewFailed
preview_failed

Trigger a webhook when a stack preview fails.

DestroySucceeded
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

DestroyFailed
destroy_failed

Trigger a webhook when a stack destroy fails.

RefreshSucceeded
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

RefreshFailed
refresh_failed

Trigger a webhook when a stack refresh fails.

DeploymentQueued
deployment_queued

Trigger a webhook when a deployment is queued.

DeploymentStarted
deployment_started

Trigger a webhook when a deployment starts running.

DeploymentSucceeded
deployment_succeeded

Trigger a webhook when a deployment succeeds.

DeploymentFailed
deployment_failed

Trigger a webhook when a deployment fails.

StackCreated
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

StackDeleted
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

UpdateSucceeded
update_succeeded

Trigger a webhook when a stack update succeeds.

UpdateFailed
update_failed

Trigger a webhook when a stack update fails.

PreviewSucceeded
preview_succeeded

Trigger a webhook when a stack preview succeeds.

PreviewFailed
preview_failed

Trigger a webhook when a stack preview fails.

DestroySucceeded
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

DestroyFailed
destroy_failed

Trigger a webhook when a stack destroy fails.

RefreshSucceeded
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

RefreshFailed
refresh_failed

Trigger a webhook when a stack refresh fails.

DeploymentQueued
deployment_queued

Trigger a webhook when a deployment is queued.

DeploymentStarted
deployment_started

Trigger a webhook when a deployment starts running.

DeploymentSucceeded
deployment_succeeded

Trigger a webhook when a deployment succeeds.

DeploymentFailed
deployment_failed

Trigger a webhook when a deployment fails.

STACK_CREATED
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

STACK_DELETED
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

UPDATE_SUCCEEDED
update_succeeded

Trigger a webhook when a stack update succeeds.

UPDATE_FAILED
update_failed

Trigger a webhook when a stack update fails.

PREVIEW_SUCCEEDED
preview_succeeded

Trigger a webhook when a stack preview succeeds.

PREVIEW_FAILED
preview_failed

Trigger a webhook when a stack preview fails.

DESTROY_SUCCEEDED
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

DESTROY_FAILED
destroy_failed

Trigger a webhook when a stack destroy fails.

REFRESH_SUCCEEDED
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

REFRESH_FAILED
refresh_failed

Trigger a webhook when a stack refresh fails.

DEPLOYMENT_QUEUED
deployment_queued

Trigger a webhook when a deployment is queued.

DEPLOYMENT_STARTED
deployment_started

Trigger a webhook when a deployment starts running.

DEPLOYMENT_SUCCEEDED
deployment_succeeded

Trigger a webhook when a deployment succeeds.

DEPLOYMENT_FAILED
deployment_failed

Trigger a webhook when a deployment fails.

"stack_created"
stack_created

Trigger a webhook when a stack is created. Only valid for org webhooks.

"stack_deleted"
stack_deleted

Trigger a webhook when a stack is deleted. Only valid for org webhooks.

"update_succeeded"
update_succeeded

Trigger a webhook when a stack update succeeds.

"update_failed"
update_failed

Trigger a webhook when a stack update fails.

"preview_succeeded"
preview_succeeded

Trigger a webhook when a stack preview succeeds.

"preview_failed"
preview_failed

Trigger a webhook when a stack preview fails.

"destroy_succeeded"
destroy_succeeded

Trigger a webhook when a stack destroy succeeds.

"destroy_failed"
destroy_failed

Trigger a webhook when a stack destroy fails.

"refresh_succeeded"
refresh_succeeded

Trigger a webhook when a stack refresh succeeds.

"refresh_failed"
refresh_failed

Trigger a webhook when a stack refresh fails.

"deployment_queued"
deployment_queued

Trigger a webhook when a deployment is queued.

"deployment_started"
deployment_started

Trigger a webhook when a deployment starts running.

"deployment_succeeded"
deployment_succeeded

Trigger a webhook when a deployment succeeds.

"deployment_failed"
deployment_failed

Trigger a webhook when a deployment fails.

WebhookFormat

Raw
raw

The default webhook format.

Slack
slack

Messages formatted for consumption by Slack incoming webhooks.

WebhookFormatRaw
raw

The default webhook format.

WebhookFormatSlack
slack

Messages formatted for consumption by Slack incoming webhooks.

Raw
raw

The default webhook format.

Slack
slack

Messages formatted for consumption by Slack incoming webhooks.

Raw
raw

The default webhook format.

Slack
slack

Messages formatted for consumption by Slack incoming webhooks.

RAW
raw

The default webhook format.

SLACK
slack

Messages formatted for consumption by Slack incoming webhooks.

"raw"
raw

The default webhook format.

"slack"
slack

Messages formatted for consumption by Slack incoming webhooks.

Package Details

Repository
pulumiservice pulumi/pulumi-pulumiservice
License
Apache-2.0