terraform-provider-github
terraform-provider-github copied to clipboard
[BUG]: github_repository_ruleset overrides merge queue
Expected Behavior
While merge queues are not yet supported, applying github_repository_ruleset
should leave merge queue configuration untouched.
Actual Behavior
Applying github_repository_ruleset
disables the merge queue, basically making github_repository_ruleset
completely unusable and useless - and even dangerous - if you are using the merge queue. The change isn't shown on the plan either (understandably).
This is somewhat understandable since it likely edits the entire ruleset in a single query, and with merge queues not supported, this just takes default values and overrides it.
This is extraordinarily unexpected behavior. The backend should not override merge queue configurations while merge queue remains unimplemented in the API.
Terraform Version
Terraform 1.9.2 on mac arm, linux x86, github provider v6.2.3
Affected Resource(s)
- github_repository_ruleset
Terraform Configuration Files
resource "github_repository_ruleset" "repo-trunk" {
repository = github_repository.repo.name
target = "branch"
enforcement = "active"
...
}
Steps to Reproduce
Either import existing ruleset, or create ruleset via terraform, then enable merge queue via UI. Then,
terraform apply -target=github_repository_ruleset.repo-trunk
Debug Output
N/A
Panic Output
N/A
Code of Conduct
- [X] I agree to follow this project's Code of Conduct