Skip to content

[BUG]: github_repository_ruleset repository is optional #2561

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

Open
1 task done
matijs opened this issue Feb 8, 2025 · 0 comments · May be fixed by #2603
Open
1 task done

[BUG]: github_repository_ruleset repository is optional #2561

matijs opened this issue Feb 8, 2025 · 0 comments · May be fixed by #2603
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@matijs
Copy link

matijs commented Feb 8, 2025

Expected Behavior

According to the documentation, repository is optional.

Actual Behavior

While the plan succeeds, the apply fails horribly:

Error: POST https://api.github.com/repos/OWNER//rulesets: 404 Not Found []

Mind the double // which maybe suggest that a repository is missing and maybe shouldn't be optional.

Terraform Version

Terraform v1.10.5
on linux_amd64

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

Affected Resource(s)

  • github_repository_ruleset

Terraform Configuration Files

resource "github_repository_ruleset" "required-linear-history" {
  enforcement = "active"
  name        = "require-linear-history"
  target      = "branch"

  rules {
    required_linear_history = true
  }
}

Steps to Reproduce

terraform apply

I'm running this on HCP Terraform and not locally, it seems that terraform plan works, but terraform apply fails.

Debug Output

Panic Output

Code of Conduct

  • I agree to follow this project's Code of Conduct
@matijs matijs added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Feb 8, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Triage in 🧰 Octokit Active Feb 8, 2025
@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Feb 27, 2025
@mikutas mikutas linked a pull request Mar 26, 2025 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

1 participant