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

[BUG]: Ruleset bypass actors create unnecessary terraform diffs

Open quoimec opened this issue 1 year ago • 2 comments

Expected Behavior

I have not made any change to the bypass actors in my org ruleset so when I apply a terraform change, it should not produce a diff relating to the bypass actors.

Actual Behavior

Terraform finds a diff between the state and remote, where it wants to flip the order of the bypass actors in the state.

Example: image

After I have applied this change, if I attempt to re-apply no diff will be found. However, if I come back and re-apply in a day for example, the diff will be there again.

I see this diff all the time - I'm just trying to understand what is going on because it causes our systems to run terraform applies when there is no need.

Terraform Version

Terraform v1.6.3

Affected Resource(s)

  • github_repository_ruleset
  • github_organization_ruleset

Terraform Configuration Files

No response

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct

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

quoimec avatar Jan 09 '24 23:01 quoimec

Adding on to this, I'm also seeing this (currently on v5.43.0) but I was able to work around it by reordering the bypass_actors blocks in the terraform code to match the plan. Looking at the plans I think it's trying to order each block so either the actor_id or actor_type is ascending.

jgutschon avatar Mar 15 '24 20:03 jgutschon

Reminds me of #1952, which was only partially fixed by #1950. Any clues, next steps, or suggestions for a full resolution, @o-sama? Thanks!

usmonster avatar Oct 18 '24 23:10 usmonster

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Jul 16 '25 02:07 github-actions[bot]