github.com/dougneal/terraform@v0.6.15-0.20170330092735-b6a3840768a4/website/source/docs/providers/github/r/repository_webhook.html.markdown (about)

     1  ---
     2  layout: "github"
     3  page_title: "GitHub: github_repository_webhook"
     4  sidebar_current: "docs-github-resource-repository-webhook"
     5  description: |-
     6    Creates and manages repository webhooks within Github organizations
     7  ---
     8  
     9  # github\_repository\_webhook
    10  
    11  This resource allows you to create and manage webhooks for repositories within your
    12  Github organization.
    13  
    14  This resource cannot currently be used to manage webhooks for *personal* repositories,
    15  outside of organizations.
    16  
    17  ## Example Usage
    18  
    19  ```
    20  resource "github_repository" "repo" {
    21    name = "foo"
    22    description = "Terraform acceptance tests"
    23    homepage_url = "http://example.com/"
    24  
    25    private = false
    26  }
    27  
    28  resource "github_repository_webhook" "foo" {
    29    repository = "${github_repository.repo.name}"
    30  
    31    name = "web"
    32    configuration {
    33      url = "https://google.de/"
    34      content_type = "form"
    35      insecure_ssl = false
    36    }
    37    active = false
    38  
    39    events = ["issues"]
    40  }
    41  ```
    42  
    43  ## Argument Reference
    44  
    45  The following arguments are supported:
    46  
    47  * `name` - (Required) The type of the webhook. See a list of [available hooks](https://api.github.com/hooks).
    48  
    49  * `repository` - (Required) The repository of the webhook.
    50  
    51  * `events` - (Required) A list of events which should trigger the webhook. Defaults to `["push"]`. See a list of [available events](https://developer.github.com/v3/activity/events/types/)
    52  
    53  * `config` - (Required) key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`.
    54  
    55  * `active` - (Optional) Indicate of the webhook should receive events. Defaults to `true`.
    56  
    57  ## Attributes Reference
    58  
    59  The following additional attributes are exported:
    60  
    61  * `url` - URL of the webhook