Skip to content

[BUG]: allowed_merge_methods shows additional diff when value is absent #3125

Closed

Description

@fh-yuxiao-zeng

Expected Behavior

After we upgraded to the latest Github provider, we see a diff for all repositories regarding allowed_merge_methods. We are not specifying anything for this field, so I expect to see no changes.

Actual Behavior

We see a diff like this:

  ~ resource "github_repository_ruleset" "this" {
        id          = "xxx"
        name        = "main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          ~ pull_request {
              ~ allowed_merge_methods             = [
                  - "merge",
                  - "rebase",
                  - "squash",
                ]
                # (5 unchanged attributes hidden)
            }
        }

        # (1 unchanged block hidden)
    }

Terraform Version

terraform-provider-github 6.10.2

Affected Resource(s)

github_repository_ruleset

Terraform Configuration Files

Steps to Reproduce

No response

Debug Output

Panic Output

Code of Conduct

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

Activity

  1. added
    Type: Bug
    Status: Triage
    on Jan 27, 2026
  2. github-actions commented on Jan 27, 2026

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  3. fh-yuxiao-zeng commented on Jan 27, 2026

    @fh-yuxiao-zeng
    Author

    This is very annoying, because now every Terraform plan contains these diffs.

    I see there is a comment from @stevehipwell that we are missing Compute: true in this PR. Will it fix the issue?

  4. self-assigned this
    on Jan 27, 2026
  5. removed
    Status: Triage
    on Jan 27, 2026
  6. added this to the v6.11.0 Release milestone on Jan 27, 2026
  7. partlythomas commented on Feb 2, 2026

    @partlythomas

    This is still an issue in the latest version as far as I can tell? rules.allowed_merge_methods is not even something that can be set?

  8. deiga commented on Feb 2, 2026

    @deiga
    Collaborator

    @partlythomas The fix has not been released yet. But rules.pull_request.allowed_merge_methods should be settable

  9. partlythomas commented on Feb 2, 2026

    @partlythomas

    @partlythomas The fix has not been released yet. But rules.pull_request.allowed_merge_methods should be settable

    I see! Strangely enough I am not able to set it at all. I will double check in my end, and also wait for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions