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]: github_organization_webhook resource creation fake-failure #2142

Closed
1 task done
gm-hyp-2 opened this issue Feb 12, 2024 · 2 comments · Fixed by #2196
Closed
1 task done

[BUG]: github_organization_webhook resource creation fake-failure #2142

gm-hyp-2 opened this issue Feb 12, 2024 · 2 comments · Fixed by #2196
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@gm-hyp-2
Copy link

Expected Behavior

When creating this resource:

resource "github_organization_webhook" "generic_webhook" {
  configuration {
    url          = "<hidden>"
    content_type = "json"
    insecure_ssl = false
    secret = var.gh_api_token
  }
  active = var.active_regions_api["us-west-2"]
  events = ["push", "pull_request" ]
}

This should create a new webhook, as described in the documentation: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_webhook#configuration

Actual Behavior

TF throws an error:

╷
│ Error: configuration.0.insecure_ssl: '' expected type 'bool', got unconvertible type 'string', value: '0'
│ 
│   with github_organization_webhook.generic_webhook,
│   on webhooks.tf line 1, in resource "github_organization_webhook" "generic_webhook":
│    1: resource "github_organization_webhook" "generic_webhook" {
│ 
╵

The problem is that we web hook actually gets created:
Screenshot 2024-02-12 at 11 03 20

So the next execution will delete and recreate the resource.

Additionally, the same resource type that was created with v5.x of the provider works just fine. The bug affects only the creation of a new webhook.

Terraform Version

Terraform 1.7.2 on linux_amd64
Affected versions: v6.0.0.0-rc2 (I have tested the creation of a new webhook only on this one)

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
@gm-hyp-2 gm-hyp-2 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Feb 12, 2024
@gm-hyp-2
Copy link
Author

One additional comment - if I remove the key insecure_ssl and let the provider use the default, it still produces the same behavior.

@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Feb 12, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Feb 12, 2024
@kfcampbell
Copy link
Member

My guess is this is related to #2133 in which we're checking and returning an error that was previously ignored. This could be a good first issue for a new contributor to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants