feat: Add resources and data sources for enterprise-owned organization app installations - #3591
Closed
zry98 wants to merge 4 commits into
Closed
feat: Add resources and data sources for enterprise-owned organization app installations#3591zry98 wants to merge 4 commits into
zry98 wants to merge 4 commits into
Conversation
|
👋 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. |
Author
|
Closing in favor of #3535 |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_repositoriesresources 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, managesrepository_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
github_enterprise_app_installation_repositoriesrevokes access to all currently selected repositories; the docs recommend managing lifecycle throughgithub_enterprise_app_installationinstead when full uninstall is wanted.github_enterprise_app_installationadditionally 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.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 toGITHUB_ENTERPRISE_SLUG).Pull request checklist
Schema migrations have been created if needed (example)Does this introduce a breaking change?
Please see our docs on breaking changes to help!