Skip to content

Commit 8cbf259

Browse files
doc: Update github_repository_webhook doc
2 parents 199780c + ca72df0 commit 8cbf259

164 files changed

Lines changed: 306 additions & 313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ body:
77
attributes:
88
value: |
99
Hi there,
10-
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
10+
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests.
11+
For general usage questions, please see: https://github.com/integrations/terraform-provider-github/discussions.
1112
1213
- type: textarea
1314
id: expected-behavior
@@ -31,9 +32,24 @@ body:
3132
label: Terraform Version
3233
description: Run `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
3334
placeholder: |
34-
Terraform v1.2.3
35+
Terraform vX.Y.Z
3536
on linux_amd64
36-
+ provider registry.terraform.io/integrations/github v5.32.0
37+
+ provider registry.terraform.io/integrations/github vX.Y.Z
38+
validations:
39+
required: true
40+
41+
- type: checkboxes
42+
id: github-installation
43+
attributes:
44+
label: GitHub Installation Type
45+
description: What type of GitHub installation are you using?
46+
options:
47+
- label: GitHub.com (Free, Pro, or Team)
48+
- label: GitHub Enterprise Server (on-premises)
49+
- label: GitHub Enterprise Cloud with Personal Accounts (github.com)
50+
- label: GitHub Enterprise Cloud with Managed Users/EMU (github.com)
51+
- label: GitHub Enterprise Cloud with Data Residency (*.ghe.com)
52+
- label: I don't know
3753
validations:
3854
required: true
3955

@@ -55,7 +71,7 @@ body:
5571
label: Terraform Configuration Files
5672
render: hcl
5773
description: |
58-
Please copy and paste any relevant configration files. This will be automatically formatted into code, so no need for backticks.
74+
Please copy and paste any relevant configuration files. This will be automatically formatted into code, so no need for backticks. If this configuration is inside a Module, please mention that.
5975
Please check your configuration before submission to ensure sensitive information is redacted.
6076
validations:
6177
required: false
@@ -64,7 +80,7 @@ body:
6480
id: steps-to-reproduce
6581
attributes:
6682
label: Steps to Reproduce
67-
description: Please list the steps required to reproduce the issue.
83+
description: Please list the steps required to reproduce the issue. Remember to mention any configuration outside of Terraform that could be relevant to the issue.
6884
placeholder: |
6985
```
7086
$ terraform apply
@@ -78,17 +94,7 @@ body:
7894
label: Debug Output
7995
description: |
8096
Please copy and paste any relevant debug output. This will be automatically formatted into code, so no need for backticks.
81-
Please check your logs before submission to ensure sensitive information is redacted.
82-
render: shell
83-
validations:
84-
required: false
85-
86-
- type: textarea
87-
id: panic-output
88-
attributes:
89-
label: Panic Output
90-
description: |
91-
Please copy and paste any relevant panic output. This will be automatically formatted into code, so no need for backticks.
97+
Please run your `terraform` command with `TF_LOG=DEBUG` set, then copy and paste the output. This will be automatically formatted into code, so no need for backticks.
9298
Please check your logs before submission to ensure sensitive information is redacted.
9399
render: shell
94100
validations:

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,7 @@ body:
1516
placeholder: Describe the need for documentation updates here.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Do these docs apply to a specific SDK version?
23-
placeholder: Octokit.NET v4.0.1
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
28-
attributes:
29-
label: API Version
30-
description: Do these docs apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
32-
validations:
33-
required: false
19+
3420
- type: textarea
3521
id: logs
3622
attributes:
@@ -39,6 +25,7 @@ body:
3925
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4026
Please check your logs before submission to ensure sensitive information is redacted.
4127
render: shell
28+
4229
- type: checkboxes
4330
id: terms
4431
attributes:

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,22 @@ body:
1516
placeholder: Describe the need for the feature.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Does this feature suggestion apply to a specific SDK version?
23-
placeholder: Octokit.rb v6.0.0
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
19+
20+
- type: checkboxes
21+
id: github-installation
2822
attributes:
29-
label: API Version
30-
description: Does this feature suggestion apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
23+
label: GitHub Installation Type
24+
description: What type of GitHub installation are you using?
25+
options:
26+
- label: GitHub.com (Free, Pro, or Team)
27+
- label: GitHub Enterprise Server (on-premises)
28+
- label: GitHub Enterprise Cloud with Personal Accounts (github.com)
29+
- label: GitHub Enterprise Cloud with Managed Users/EMU (github.com)
30+
- label: GitHub Enterprise Cloud with Data Residency (*.ghe.com)
31+
- label: I don't know
3232
validations:
33-
required: false
33+
required: true
34+
3435
- type: textarea
3536
id: logs
3637
attributes:
@@ -39,6 +40,7 @@ body:
3940
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4041
Please check your logs before submission to ensure sensitive information is redacted.
4142
render: shell
43+
4244
- type: checkboxes
4345
id: terms
4446
attributes:

.github/ISSUE_TEMPLATE/maintenance.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ body:
77
attributes:
88
value: |
99
Thanks for taking the time to fill this out!
10+
1011
- type: textarea
1112
id: describe-need
1213
attributes:
@@ -15,22 +16,7 @@ body:
1516
placeholder: Describe the maintenance need here.
1617
validations:
1718
required: true
18-
- type: input
19-
id: sdk_version
20-
attributes:
21-
label: SDK Version
22-
description: Does this maintenance apply to a specific SDK version?
23-
placeholder: terraform-provider-github v5.7.0
24-
validations:
25-
required: false
26-
- type: input
27-
id: api_version
28-
attributes:
29-
label: API Version
30-
description: Does this maintenance apply to a specific version of the GitHub REST API or GraphQL API?
31-
placeholder: ex. v1.1.1
32-
validations:
33-
required: false
19+
3420
- type: textarea
3521
id: logs
3622
attributes:
@@ -39,6 +25,7 @@ body:
3925
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
4026
Please check your logs before submission to ensure sensitive information is redacted.
4127
render: shell
28+
4229
- type: checkboxes
4330
id: terms
4431
attributes:

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ jobs:
5454
go-version-file: go.mod
5555
cache: true
5656
- name: Set-up Terraform
57-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
57+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
5858
with:
5959
terraform_version: latest
6060
terraform_wrapper: false
6161
- run: make checkdocs
6262
- run: make validatedocs
63-
- uses: rvben/rumdl@9a78b143c00cc273fa0636410b91ec9acde1004a # v0.1.90
63+
- uses: rvben/rumdl@3cf0ff7193ebd32f6f158d1b668592390ceaa696 # v0.1.91
6464
with:
6565
path: ./docs
6666
report-type: annotations

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
cache: true
5050

5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
52+
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
5353
with:
5454
languages: ${{ matrix.language }}
5555
build-mode: ${{ matrix.build-mode }}
@@ -60,6 +60,6 @@ jobs:
6060
run: go build ./...
6161

6262
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
63+
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
6464
with:
6565
category: "/language:${{matrix.language}}"

.github/workflows/dotcom-acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
cache: true
8383

8484
- name: Setup Terraform
85-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
85+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
8686
with:
8787
terraform_version: latest
8888
terraform_wrapper: false

.github/workflows/ghes-acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
cache: true
9494

9595
- name: Setup Terraform
96-
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
96+
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
9797
with:
9898
terraform_version: latest
9999
terraform_wrapper: false

docs/resources/repository_webhook.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
page_title: "github_repository_webhook (Resource) - GitHub"
3+
subcategory: ""
34
description: |-
4-
Creates and manages repository webhooks within GitHub organizations or personal accounts
5+
This resource allows you to create and manage webhooks for specific repositories.
56
---
67

78
# github_repository_webhook (Resource)
89

9-
This resource allows you to create and manage webhooks for repositories within your GitHub organization or personal account.
10+
This resource allows you to create and manage webhooks for specific repositories.
1011

1112
~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing webhook modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository.
1213

@@ -36,42 +37,57 @@ resource "github_repository_webhook" "example_webhook" {
3637
}
3738
```
3839

39-
## Argument Reference
40+
<!-- schema generated by tfplugindocs -->
41+
## Schema
4042

41-
The following arguments are supported:
43+
### Required
4244

43-
- `repository` - (Required) The repository of the webhook.
45+
- `events` (Set of String) A list of events which should trigger the webhook
46+
- `repository` (String) The repository name of the webhook, not including the organization, which will be inferred.
4447

45-
- `events` - (Required) A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/).
48+
### Optional
4649

47-
- `configuration` - (Required) Configuration block for the webhook. [Detailed below.](#configuration)
50+
- `active` (Boolean) Indicate if the webhook should receive events. Defaults to 'true'.
51+
- `configuration` (Block List, Max: 1) Configuration for the webhook. (see [below for nested schema](#nestedblock--configuration))
52+
- `etag` (String)
4853

49-
- `active` - (Optional) Indicate if the webhook should receive events. Defaults to `true`.
54+
### Read-Only
5055

51-
### configuration
56+
- `id` (String) The ID of this resource.
57+
- `url` (String) Configuration block for the webhook
5258

53-
- `url` - (Required) The URL of the webhook.
59+
<a id="nestedblock--configuration"></a>
60+
### Nested Schema for `configuration`
5461

55-
- `content_type` - (Required) The content type for the payload. Valid values are either `form` or `json`.
62+
Required:
5663

57-
- `secret` - (Optional) The shared secret for the webhook. [See API documentation](https://developer.github.com/v3/repos/hooks/#create-a-hook).
64+
- `url` (String, Sensitive) The URL of the webhook.
5865

59-
- `insecure_ssl` - (Optional) Insecure SSL boolean toggle. Defaults to `false`.
66+
Optional:
6067

61-
## Attributes Reference
68+
- `content_type` (String) The content type for the payload. Valid values are either 'form' or 'json'.
69+
- `insecure_ssl` (Boolean) Insecure SSL boolean toggle. Defaults to 'false'.
70+
- `secret` (String, Sensitive) The shared secret for the webhook
6271

63-
The following additional attributes are exported:
72+
## Import
6473

65-
- `url` - URL of the webhook. This is a sensitive attribute because it may include basic auth credentials.
74+
Import is supported using the following syntax:
6675

67-
## Import
76+
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/123456789"`, where `123456789` is the `id` of the webhook.
77+
78+
In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `id` attribute, for example:
6879

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.
80+
```terraform
81+
import {
82+
to = github_repository_webhook.example_webhook
83+
id = "example-repo/123456789"
84+
}
85+
```
7086

71-
Importing uses the `name` of the repository, as well as the `id` of the webhook, e.g.
87+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
7288

7389
```shell
74-
terraform import github_repository_webhook.example_webhook example-repo/14711452
90+
terraform import github_repository_webhook.example_webhook example-repo/123456789
7591
```
7692

7793
If secret is populated in the webhook's configuration, the value will be imported as "********".
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {
2+
to = github_repository_webhook.example_webhook
3+
id = "example-repo/123456789"
4+
}

0 commit comments

Comments
 (0)