Webhook

class Webhook : KotlinCustomResource

Provides a CodePipeline Webhook.

Example Usage

resources:
bar:
type: aws:codepipeline:Pipeline
properties:
name: tf-test-pipeline
roleArn: ${barAwsIamRole.arn}
artifactStores:
- location: ${barAwsS3Bucket.bucket}
type: S3
encryptionKey:
id: ${s3kmskey.arn}
type: KMS
stages:
- name: Source
actions:
- name: Source
category: Source
owner: ThirdParty
provider: GitHub
version: '1'
outputArtifacts:
- test
configuration:
Owner: my-organization
Repo: test
Branch: master
- name: Build
actions:
- name: Build
category: Build
owner: AWS
provider: CodeBuild
inputArtifacts:
- test
version: '1'
configuration:
ProjectName: test
barWebhook:
type: aws:codepipeline:Webhook
name: bar
properties:
name: test-webhook-github-bar
authentication: GITHUB_HMAC
targetAction: Source
targetPipeline: ${bar.name}
authenticationConfiguration:
secretToken: ${webhookSecret}
filters:
- jsonPath: $.ref
matchEquals: refs/heads/{Branch}
# Wire the CodePipeline webhook into a GitHub repository.
barRepositoryWebhook:
type: github:RepositoryWebhook
name: bar
properties:
repository: ${repo.name}
name: web
configuration:
url: ${barWebhook.url}
contentType: json
insecureSsl: true
secret: ${webhookSecret}
events:
- push
variables:
webhookSecret: super-secret

Import

Using pulumi import, import CodePipeline Webhooks using their ARN. For example:

$ pulumi import aws:codepipeline/webhook:Webhook example arn:aws:codepipeline:us-west-2:123456789012:webhook:example

Properties

Link copied to clipboard
val arn: Output<String>

The CodePipeline webhook's ARN.

Link copied to clipboard
val authentication: Output<String>

The type of authentication to use. One of IP, GITHUB_HMAC, or UNAUTHENTICATED.

Link copied to clipboard

An auth block. Required for IP and GITHUB_HMAC. Auth blocks are documented below.

Link copied to clipboard
val filters: Output<List<WebhookFilter>>

One or more filter blocks. Filter blocks are documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the webhook.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val targetAction: Output<String>

The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.

Link copied to clipboard
val targetPipeline: Output<String>

The name of the pipeline.

Link copied to clipboard
val url: Output<String>

The CodePipeline webhook's URL. POST events to this endpoint to trigger the target.

Link copied to clipboard
val urn: Output<String>