Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions website/docs/r/repository_webhook.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ GitHub organization or personal account.
## Example Usage

```hcl
resource "github_repository" "repo" {
name = "foo"
resource "github_repository" "example_repo" {
name = "example-repo"
description = "Terraform acceptance tests"
homepage_url = "http://example.com/"

visibility = "public"
}

resource "github_repository_webhook" "foo" {
repository = github_repository.repo.name
resource "github_repository_webhook" "example_webhook" {
repository = github_repository.example_repo.name

configuration {
url = "https://google.de/"
Expand Down Expand Up @@ -69,12 +69,12 @@ The following additional attributes are exported:
## Import

Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character.
The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`.
The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/example-org/example-repo/settings/hooks/14711452"`, where `14711452` is the ID of the webhook.

Importing uses the name of the repository, as well as the ID of the webhook, e.g.

```
$ terraform import github_repository_webhook.terraform terraform/11235813
$ terraform import github_repository_webhook.example_webhook example-repo/14711452
```

If secret is populated in the webhook's configuration, the value will be imported as "********".