Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Webhook does not set content_type #2531

Open
1 task done
magzim21 opened this issue Jan 8, 2025 · 1 comment
Open
1 task done

[BUG]: Webhook does not set content_type #2531

magzim21 opened this issue Jan 8, 2025 · 1 comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@magzim21
Copy link

magzim21 commented Jan 8, 2025

Expected Behavior

resource "github_organization_webhook" "argocd" {
  # name = "argocd"

  configuration {
    url          = "https://argocd.${var.organization_domain}/api/webhook"
    content_type = "application/json" # BUG IS HERE
    insecure_ssl = false
  }

  active = true

  events = ["push"]
}

Actual Behavior

Github sends request with "application/x-www-form-urlencoded" header, but it shows application/json in UI.
Re-enabling application/json manually in UI fixes this.

Terraform Version

Terraform v1.9.5

  • provider registry.terraform.io/integrations/github v6.4.0

Affected Resource(s)

github_organization_webhook

Terraform Configuration Files

No response

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@magzim21 magzim21 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 8, 2025
@magzim21 magzim21 changed the title [BUG]: [BUG]: Webhook does not set content_type Jan 8, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Jan 8, 2025
@magzim21
Copy link
Author

magzim21 commented Jan 8, 2025

I realized that the expected value is json , but application/json does not throw a validation error and UI shows application/json misleadingly.
Need to add validation and clarify Provider doc page, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

1 participant