Skip to content

feat: Add resources and data sources for enterprise-owned organization app installations - #3591

Closed
zry98 wants to merge 4 commits into
integrations:mainfrom
zry98:feat/enterprise-apps-installation
Closed

feat: Add resources and data sources for enterprise-owned organization app installations#3591
zry98 wants to merge 4 commits into
integrations:mainfrom
zry98:feat/enterprise-apps-installation

Conversation

@zry98

@zry98 zry98 commented Jul 30, 2026

Copy link
Copy Markdown

Resolves #3590


Before the change?

The provider cannot manage GitHub App installations on enterprise-owned organizations. The enterprise-admin organization-installations endpoints are not exposed, so enterprise owners must install/uninstall apps and manage their repository access manually via the UI. The existing github_app_installation_repository / github_app_installation_repositories resources only cover org/user-scoped installations, and are not compatible with the GitHub App Installation authentication method.

After the change?

New resources:

  • github_enterprise_app_installation - installs a GitHub App (by client ID) on an enterprise-owned organization, manages repository_selection (all / selected / none) and the selected repositories, and uninstalls the app on destroy. Importable as <enterprise_slug>:<organization>:<installation_id>.
  • github_enterprise_app_installation_repositories - reconciles the set of repositories accessible to an existing enterprise-managed installation using the grant/revoke endpoints. Importable with the same ID format.

New data sources:

  • github_enterprise_app_installations - lists app installations on an enterprise-owned organization.
  • github_enterprise_app_installable_organizations - lists the organizations in an enterprise that apps can be installed on.
  • github_enterprise_app_accessible_organization_repositories - lists the repositories of an enterprise-owned organization that an app can be granted access to.

Notes

  • The REST API currently has no direct GET for a single enterprise-owned org installation, so the resource read lists installations and filters by ID.
  • Deleting github_enterprise_app_installation_repositories revokes access to all currently selected repositories; the docs recommend managing lifecycle through github_enterprise_app_installation instead when full uninstall is wanted.
  • These resources call the enterprise-admin organization-installations endpoints with whatever credentials the provider is configured with (e.g. an enterprise-owner PAT). Authenticating the provider itself as an enterprise-scoped app installation is not covered here and still requires [FEAT]: Allow usage of enterprise app installation #2886 to be resolved.
  • Acceptance tests for these resources are difficult to provide:
    • All five endpoints require a GitHub Enterprise Cloud account and an enterprise-owned organization.
    • github_enterprise_app_installation additionally needs a registered GitHub App (known client ID) that is not already installed on the target organization, so the test can install and uninstall it. That fixture can't be created on the fly via API; it must be pre-provisioned in the test enterprise.
    • I don't have access to a disposable enterprise to run these against, but happy to add skipUnlessEnterprise-guarded acceptance tests if reviewers can point me at the expected fixtures in the CI test enterprise (e.g. an env var for a test app client ID, similar to GITHUB_ENTERPRISE_SLUG).

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
Copy Markdown

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

@github-actions github-actions Bot added the Type: Feature New feature or request label Jul 30, 2026
@zry98

zry98 commented Jul 31, 2026

Copy link
Copy Markdown
Author

Closing in favor of #3535

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

Labels

Type: Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Support managing GitHub App installations on enterprise-owned organizations

1 participant