integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
863 stars 708 forks source link

[DOCS]: github_organization_webhook missing org name #2307

Open ayakout-magna opened 2 days ago

ayakout-magna commented 2 days ago

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