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

[BUG]: POST https://api.github.com/orgs/Xealth/custom-repository-roles: 404 Not Found

Open rwlodarczyk-xealth opened this issue 6 months ago • 1 comments

Expected Behavior

The github_organization_custom_role resource should work.

Actual Behavior

The github_organization_custom_role resource does not work.

github_organization_custom_role.pull-dependabot-secret-scanning-alerts: Creating...
╷
│ Error: error creating GitHub custom repository role Xealth (pull-dependabot-secret-scanning-alerts): POST https://api.github.com/orgs/Xealth/custom-repository-roles: 404 Not Found []
│
│   with github_organization_custom_role.pull-dependabot-secret-scanning-alerts,
│   on roles.tf line 1, in resource "github_organization_custom_role" "pull-dependabot-secret-scanning-alerts":
│    1: resource "github_organization_custom_role" "pull-dependabot-secret-scanning-alerts" {
│

Terraform Version

OpenTofu v1.9.1 on darwin_arm64

  • provider registry.opentofu.org/integrations/github v6.6.0

Affected Resource(s)

  • github_organization_custom_role

Terraform Configuration Files


Steps to Reproduce

  1. Create a resource:
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

OpenTofu will perform the following actions:

  # github_organization_custom_role.pull-dependabot-secret-scanning-alerts will be created
  + resource "github_organization_custom_role" "pull-dependabot-secret-scanning-alerts" {
      + base_role   = "read"
      + description = "Read-only with Dependabot and Secret Scanning permissions."
      + id          = (known after apply)
      + name        = "pull-dependabot-secret-scanning-alerts"
      + permissions = [
          + "view_dependabot_alerts",
          + "view_secret_scanning_alerts",
        ]
    }

Plan: 1 to add, 0 to change, 0 to destroy.
  1. Try to apply:
github_organization_custom_role.pull-dependabot-secret-scanning-alerts: Creating...
╷
│ Error: error creating GitHub custom repository role Xealth (pull-dependabot-secret-scanning-alerts): POST https://api.github.com/orgs/Xealth/custom-repository-roles: 404 Not Found []
│
│   with github_organization_custom_role.pull-dependabot-secret-scanning-alerts,
│   on roles.tf line 1, in resource "github_organization_custom_role" "pull-dependabot-secret-scanning-alerts":
│    1: resource "github_organization_custom_role" "pull-dependabot-secret-scanning-alerts" {
│
╵

Debug Output


Panic Output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

rwlodarczyk-xealth avatar May 23 '25 17:05 rwlodarczyk-xealth

This broke after May 6, 2025. It worked on May 6th, but now fails because of the 404.

rwlodarczyk-xealth avatar May 23 '25 17:05 rwlodarczyk-xealth

Any update on this?

@nickfloyd This is a pretty important fix; otherwise the GitHub Terraform provider doesn't work. I don't understand this was moved to Backlog.

rwlodarczyk-xealth avatar Jun 23 '25 17:06 rwlodarczyk-xealth