terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[DOCS]: github_organization_webhook missing org name

Open ayakout-magna opened this issue 1 year ago • 0 comments

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

ayakout-magna avatar Jul 04 '24 16:07 ayakout-magna