Skip to content

[FEAT] Add Enterprise SCIM data sources (groups/users)#3012

Open
vmvarela wants to merge 7 commits intointegrations:mainfrom
vmvarela:enterprise-scim
Open

[FEAT] Add Enterprise SCIM data sources (groups/users)#3012
vmvarela wants to merge 7 commits intointegrations:mainfrom
vmvarela:enterprise-scim

Conversation

@vmvarela
Copy link

New data sources:

  • github_enterprise_scim_groups — GET /scim/v2/enterprises/{enterprise}/Groups (auto-paginates to fetch all results)
  • github_enterprise_scim_group — GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
  • github_enterprise_scim_users — GET /scim/v2/enterprises/{enterprise}/Users (auto-paginates to fetch all results)
  • github_enterprise_scim_user — GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}

Shared helper/types in util_enterprise_scim.go:

  • SCIM request builder + Accept: application/scim+json
  • SCIM list pagination loop using startIndex/count (exposed as results_per_page, fetch-all by default)
  • Full-fidelity flattening for groups/users (meta, members, emails, roles, name, etc.)

Before the change?

  • No support for reading enterprise SCIM entities

After the change?

  • Implements: enterprise SCIM read data sources for Groups/Users (list + get).

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@github-actions
Copy link

👋 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! 🚀

@vmvarela vmvarela closed this Dec 21, 2025
@vmvarela vmvarela reopened this Dec 22, 2025
Copilot AI review requested due to automatic review settings January 6, 2026 18:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive SCIM (System for Cross-domain Identity Management) data source support for GitHub Enterprise, enabling users to query provisioned groups and users through Terraform.

  • Implements four new data sources for enterprise SCIM groups and users (list and individual retrieval)
  • Adds shared utility functions for SCIM API interactions with automatic pagination support
  • Includes comprehensive test coverage and documentation for all new data sources

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
github/provider.go Registers the four new SCIM data sources in the provider
github/util_enterprise_scim.go Implements shared SCIM utilities including pagination, request building, and data flattening functions
github/data_source_github_enterprise_scim_groups.go Data source for listing all SCIM groups with filtering and pagination support
github/data_source_github_enterprise_scim_group.go Data source for retrieving a single SCIM group by ID
github/data_source_github_enterprise_scim_users.go Data source for listing all SCIM users with filtering and pagination support
github/data_source_github_enterprise_scim_user.go Data source for retrieving a single SCIM user by ID
github/data_source_github_enterprise_scim_groups_test.go Unit tests for groups listing with multi-page pagination
github/data_source_github_enterprise_scim_group_test.go Unit tests for individual group retrieval
github/data_source_github_enterprise_scim_users_test.go Unit tests for users listing with filtering and pagination
github/data_source_github_enterprise_scim_user_test.go Unit tests for individual user retrieval
website/docs/d/enterprise_scim_groups.html.markdown Documentation for the SCIM groups listing data source
website/docs/d/enterprise_scim_group.html.markdown Documentation for the single SCIM group data source
website/docs/d/enterprise_scim_users.html.markdown Documentation for the SCIM users listing data source
website/docs/d/enterprise_scim_user.html.markdown Documentation for the single SCIM user data source

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vmvarela vmvarela force-pushed the enterprise-scim branch 2 times, most recently from e64c25b to 615a000 Compare January 8, 2026 16:36
@vmvarela vmvarela changed the title feat: Add Enterprise SCIM data sources (groups/users) [FEAT] Add Enterprise SCIM data sources (groups/users) Jan 8, 2026
@vmvarela vmvarela force-pushed the enterprise-scim branch 2 times, most recently from c2d1b94 to ebf28a4 Compare January 10, 2026 11:11
@vmvarela vmvarela force-pushed the enterprise-scim branch 6 times, most recently from f785b45 to 5c4e52b Compare January 22, 2026 10:22
@vmvarela vmvarela force-pushed the enterprise-scim branch 3 times, most recently from 5ff4c77 to b5c9eb3 Compare February 3, 2026 09:24
@vmvarela vmvarela force-pushed the enterprise-scim branch 2 times, most recently from b7d8d51 to 074c322 Compare February 4, 2026 08:31
@vmvarela
Copy link
Author

vmvarela commented Feb 4, 2026

Commit history reorganized 🔄

Hi @deiga, I've reorganized the commit history as requested. The changes are now split into logical, granular commits:

  1. feat(enterprise-scim): add utility functions for SCIM data sources
  2. feat(enterprise-scim): add github_enterprise_scim_group data source
  3. feat(enterprise-scim): add github_enterprise_scim_groups data source
  4. feat(enterprise-scim): add github_enterprise_scim_user data source
  5. feat(enterprise-scim): add github_enterprise_scim_users data source
  6. feat(enterprise-scim): register SCIM data sources in provider
  7. fix(enterprise-scim): update go-github import to v82

Each commit is self-contained and can be reviewed independently. Going forward, I'll create new commits for any review feedback instead of amending.

Add util_enterprise_scim.go with helper functions for flattening
SCIM user and group data from the GitHub API.
Retrieve information about a single SCIM group by ID.

Includes:
- Data source implementation
- Acceptance tests
- Documentation
List all SCIM groups in an enterprise with optional filtering.

Includes:
- Data source implementation
- Acceptance tests
- Documentation
Retrieve information about a single SCIM user by ID.

Includes:
- Data source implementation
- Acceptance tests
- Documentation
List all SCIM users in an enterprise with optional filtering.

Includes:
- Data source implementation
- Acceptance tests
- Documentation
- Register 4 data sources in provider.go:
  - github_enterprise_scim_group
  - github_enterprise_scim_groups
  - github_enterprise_scim_user
  - github_enterprise_scim_users
Update import paths from go-github/v81 to go-github/v82 to match
the current version in upstream/main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant