Webhook
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
Content copied to clipboard
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
Content copied to clipboard
Properties
Link copied to clipboard
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
One or more filter
blocks. Filter blocks are documented below.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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
The name of the pipeline.