Skip to content

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

Closed

Description

@gm-hyp-2

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

Activity

  1. added
    Status: Triage
    Type: Bug
    on Feb 12, 2024
  2. gm-hyp-2 commented on Feb 12, 2024

    @gm-hyp-2
    Author

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

  3. added
    Status: Up for grabs
    and removed
    Status: Triage
    on Feb 12, 2024
  4. moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Activeon Feb 12, 2024
  5. kfcampbell commented on Feb 12, 2024

    @kfcampbell
    Contributor

    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.

  6. moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Activeon Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsType: Bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions