integrations / integrations/terraform-provider-github

[DOCS]: github_organization_webhook missing org name

Open
#2,307 4 comments 0 reactions 0 assignees View on GitHub
r/organization_webhook Type: Documentation
Dominant language
Go
Stars
1.2k
Forks
1k
Avg merge
1d 14h
Merged PRs (30d)
8

Description

### Describe the need

In Terraform's GitHub provider, the `github_organization_webhook` resource is designed to manage webhooks at the organization level within GitHub. However, unlike its counterpart `github_repository_webhook`, which includes a field for specifying the repository name, the `github_organization_webhook` resource does not have an explicit field to define the organization name.

Issue Details
When configuring the `github_organization_webhook` resource, users are expected to define various attributes such as the webhook URL, events to listen for, and security settings. A typical configuration might look like this:

```
resource "github_organization_webhook" "example" {
url = "https://example.com/webhook"
events = ["push", "pull_request"]

configuration {
content_type = "json"
insecure_ssl = false
secret = "my_secret_token"
}

active = true
}
```

The Problem
The issue arises because the `github_organization_webhook` resource does not include a field to specify which organization the webhook should be created for. This contrasts with the `github_repository_webhook` resource, where you can explicitly set the repository name:

```
resource "github_repository_webhook" "example" {
repository = "my-repo"
url = "https://example.com/webhook"
events = ["push"]

configuration {
content_type = "json"
insecure_ssl = false
secret = "my_secret_token"
}

active = true
}
```

### SDK Version

_No response_

### API Version

_No response_

### Relevant log output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.