Skip to content

Commit 199780c

Browse files
doc: Update github_repository_webhook doc
1 parent 2de4611 commit 199780c

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

docs/resources/repository_webhook.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ The following additional attributes are exported:
6666

6767
## Import
6868

69-
Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character.
70-
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.
69+
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/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook.
7170

72-
Importing uses the name of the repository, as well as the ID of the webhook, e.g.
71+
Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g.
7372

74-
```sh
73+
```shell
7574
terraform import github_repository_webhook.example_webhook example-repo/14711452
7675
```
7776

examples/resources/repository_webhook/example_1.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
resource "github_repository" "repo" {
2-
name = "foo"
1+
resource "github_repository" "example_repo" {
2+
name = "example-repo"
33
description = "Terraform acceptance tests"
44
homepage_url = "http://example.com/"
55

66
visibility = "public"
77
}
88

9-
resource "github_repository_webhook" "foo" {
10-
repository = github_repository.repo.name
9+
resource "github_repository_webhook" "example_webhook" {
10+
repository = github_repository.example_repo.name
1111

1212
configuration {
1313
url = "https://google.de/"

templates/resources/repository_webhook.md.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ The following additional attributes are exported:
4444

4545
## Import
4646

47-
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"`.
47+
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/example-org/example-repo/settings/hooks/14711452"`, where 14711452 is the `id` of the webhook.
4848

49-
Importing uses the name of the repository, as well as the ID of the webhook, e.g.
49+
Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g.
5050

5151
```shell
52-
terraform import github_repository_webhook.terraform terraform/11235813
52+
terraform import github_repository_webhook.example_webhook example-repo/14711452
5353
```
5454

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

0 commit comments

Comments
 (0)