integrations / integrations/terraform-provider-github
[BUG] members_can_create_internal_repositories in github_organization_settings missing Computed: true causing phantom diffs
Open
r/organization_settings
Status: Triage
Type: Bug
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
When a user omits `members_can_create_internal_repositories` from their config and the enterprise controls the setting externally, every plan shows a diff (state `true` to zero-value `false`). Applying that diff sends an update that fails with 422 because the enterprise policy won't allow the change.
The root cause is the same as #3360: the field is `Optional` without `Computed`, so the Read function writing the API value back into state conflicts with Terraform's zero-value assumption. Adding `Computed: true` fixes it.
Contributor guide
Assessment
This issue has not been assessed yet.