Skip to content

[FEAT]: Expose remaining org attributes in github_organization_settings #3388

Open

Description

@JamBalaya56562

Describe the need

The github_organization_settings resource currently exposes only a subset of the attributes that PATCH /orgs/{org} accepts and that the upstream go-github library already models on the Organization struct. Configurations that need to manage these settings as code currently have to fall back to the GitHub UI / REST.

The following seven attributes are missing from the resource even though go-github v85's Organization struct already carries fields with matching JSON tags, so surfacing them is a mechanical change:

  • members_allowed_repository_creation_type — listed in PATCH /orgs/{org} docs as a settable body parameter
  • two_factor_requirement_enabled
  • members_can_delete_repositories
  • members_can_invite_outside_collaborators
  • members_can_delete_issues
  • display_commenter_full_name_setting_enabled
  • readers_can_create_discussions

The five that are not already exposed by the github_organization data source (members_can_delete_repositories, members_can_invite_outside_collaborators, members_can_delete_issues, display_commenter_full_name_setting_enabled, readers_can_create_discussions) should also be added there for symmetry, matching the pattern from #1850.

This is the same shape of change as #3147 (which adds members_can_change_repo_visibility); they could be merged independently.

Out of scope for this issue:

  • members_can_change_repo_visibility — already covered by feat: Add support for members_can_change_repo_visibility in github_organization_settings #3147
  • deploy_keys_enabled_for_repositories — listed in REST docs but missing from the go-github Organization struct; needs an upstream go-github change first
  • members_can_create_teams, members_can_view_dependency_insights — REST docs only show these in GET responses; need empirical verification that PATCH accepts them before adding

SDK Version

terraform-provider-github main (post v6.12, current HEAD add2157906)

API Version

REST API 2022-11-28

Code of Conduct

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

Activity

  1. github-actions commented on May 2, 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! 🚀

  2. added
    Type: Feature
    Status: Triage
    on May 10, 2026
  3. naokit-dev commented on May 14, 2026

    @naokit-dev

    We hit this exact behavior in production today on a GitHub Enterprise Cloud org.

    terraform apply flipped members_can_create_repositories: false → true and members_can_create_private_repositories: false → true (granular booleans for public/internal were unchanged in our config). The provider correctly built a PATCH containing only those two changed fields per the HasChange-based logic in buildOrganizationSettings.

    GitHub's API responded by resetting members_allowed_repository_creation_type to all, which silently flipped members_can_create_public_repositories and members_can_create_internal_repositories back to true server-side — directly contradicting our Terraform config. terraform plan came back clean afterwards because state was refreshed from the (now-wrong) server values.

    We had to manually reconcile via:

    gh api -X PATCH orgs/<org> \
      -F members_can_create_internal_repositories=false \
      -f members_allowed_repository_creation_type=private
    

    Exposing members_allowed_repository_creation_type in github_organization_settings would let the provider send the legacy field alongside the granular booleans in the same PATCH and prevent this silent drift. Strong +1 on prioritizing this attribute over the others in the list.

  4. robert-crandall commented on Nov 25, 2026

    @robert-crandall
    Contributor

    Linking #3389 from @JamBalaya56562 here for reference. We closed it as part of our temporary move to an issue-first model (see CONTRIBUTING.md), and want to keep the context and implementation approach handy when we pick this issue up.

  5. robert-crandall commented on Nov 25, 2026

    @robert-crandall
    Contributor

    Linking #3432 from @JamBalaya56562 here for reference. We closed it as part of our temporary move to an issue-first model (see CONTRIBUTING.md), and want to keep the context and implementation approach handy when we pick this issue up.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageType: Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions