integrations / integrations/terraform-provider-github

Setting members_can_fork_private_repositories resets organisational fork policy

Open
#1,844 14 comments 1 reaction 0 assignees View on GitHub
r/organization_settings Type: Bug vNext
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:

![image](https://github.com/integrations/terraform-provider-github/assets/35613489/678a0e36-f571-41d8-87ae-880104c30b9d)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.