integrations / integrations/terraform-provider-github
Setting members_can_fork_private_repositories resets organisational fork policy
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
We're now using the `github_organization_settings` to configure some organisational settings (instead of "manual") and we noticed that settings `members_can_fork_private_repositories` works in unexpected ways with the organisational settings:

We had forking set to `User accounts`, imported the `github_organization_settings` resource (where `members_can_fork_private_repositories` apparantly is set to `True` and not TF changes this to the "Default" `Organisations within this enterprise`.
This is quite unexpected behaviour, and after reading up other issues decided to remove this setting from the resource entirely. When removing it TF actually said it would change the setting (`update members_can_fork_private_repositories : true change to false`). But the setting is now kept intact.
So:
- Organisation settings and Forking looks "off" (could be related to Enterprise)
- Is there a resource to change the forking policy of an (enterprise) organisation?
Related links:
- https://github.com/integrations/terraform-provider-github/issues/1199
- https://github.com/integrations/terraform-provider-github/issues/1333
- https://github.com/integrations/terraform-provider-github/pull/1362
Contributor guide
Assessment
This issue has not been assessed yet.