published on Friday, Aug 14, 2026 by Pulumi
published on Friday, Aug 14, 2026 by Pulumi
Note: This resource is not compatible with the GitHub App Installation authentication method.
This resource manages relationships between app installations and repositories in your GitHub organization or your user account.
Creating this resource installs a particular app on multiple repositories.
The app installation and the repositories must all belong to the same organization or user account on GitHub. Note: you can review your organization’s installations by the following the instructions at this link or for your user account at this link.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Create some repositories.
const someRepo = new github.Repository("some_repo", {name: "some-repo"});
const anotherRepo = new github.Repository("another_repo", {name: "another-repo"});
const someAppRepos = new github.AppInstallationRepositories("some_app_repos", {
installationId: "1234567",
selectedRepositories: [
someRepo.name,
anotherRepo.name,
],
});
import pulumi
import pulumi_github as github
# Create some repositories.
some_repo = github.Repository("some_repo", name="some-repo")
another_repo = github.Repository("another_repo", name="another-repo")
some_app_repos = github.AppInstallationRepositories("some_app_repos",
installation_id="1234567",
selected_repositories=[
some_repo.name,
another_repo.name,
])
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create some repositories.
someRepo, err := github.NewRepository(ctx, "some_repo", &github.RepositoryArgs{
Name: pulumi.String("some-repo"),
})
if err != nil {
return err
}
anotherRepo, err := github.NewRepository(ctx, "another_repo", &github.RepositoryArgs{
Name: pulumi.String("another-repo"),
})
if err != nil {
return err
}
_, err = github.NewAppInstallationRepositories(ctx, "some_app_repos", &github.AppInstallationRepositoriesArgs{
InstallationId: pulumi.String("1234567"),
SelectedRepositories: pulumi.StringArray{
someRepo.Name,
anotherRepo.Name,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Create some repositories.
var someRepo = new Github.Repository("some_repo", new()
{
Name = "some-repo",
});
var anotherRepo = new Github.Repository("another_repo", new()
{
Name = "another-repo",
});
var someAppRepos = new Github.AppInstallationRepositories("some_app_repos", new()
{
InstallationId = "1234567",
SelectedRepositories = new[]
{
someRepo.Name,
anotherRepo.Name,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.AppInstallationRepositories;
import com.pulumi.github.AppInstallationRepositoriesArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create some repositories.
var someRepo = new Repository("someRepo", RepositoryArgs.builder()
.name("some-repo")
.build());
var anotherRepo = new Repository("anotherRepo", RepositoryArgs.builder()
.name("another-repo")
.build());
var someAppRepos = new AppInstallationRepositories("someAppRepos", AppInstallationRepositoriesArgs.builder()
.installationId("1234567")
.selectedRepositories(
someRepo.name(),
anotherRepo.name())
.build());
}
}
resources:
# Create some repositories.
someRepo:
type: github:Repository
name: some_repo
properties:
name: some-repo
anotherRepo:
type: github:Repository
name: another_repo
properties:
name: another-repo
someAppRepos:
type: github:AppInstallationRepositories
name: some_app_repos
properties:
installationId: '1234567'
selectedRepositories:
- ${someRepo.name}
- ${anotherRepo.name}
pulumi {
required_providers {
github = {
source = "pulumi/github"
}
}
}
# Create some repositories.
resource "github_repository" "some_repo" {
name = "some-repo"
}
resource "github_repository" "another_repo" {
name = "another-repo"
}
resource "github_appinstallationrepositories" "some_app_repos" {
installation_id = "1234567"
selected_repositories = [github_repository.some_repo.name, github_repository.another_repo.name]
}
Create AppInstallationRepositories Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AppInstallationRepositories(name: string, args: AppInstallationRepositoriesArgs, opts?: CustomResourceOptions);@overload
def AppInstallationRepositories(resource_name: str,
args: AppInstallationRepositoriesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AppInstallationRepositories(resource_name: str,
opts: Optional[ResourceOptions] = None,
installation_id: Optional[str] = None,
selected_repositories: Optional[Sequence[str]] = None)func NewAppInstallationRepositories(ctx *Context, name string, args AppInstallationRepositoriesArgs, opts ...ResourceOption) (*AppInstallationRepositories, error)public AppInstallationRepositories(string name, AppInstallationRepositoriesArgs args, CustomResourceOptions? opts = null)
public AppInstallationRepositories(String name, AppInstallationRepositoriesArgs args)
public AppInstallationRepositories(String name, AppInstallationRepositoriesArgs args, CustomResourceOptions options)
type: github:AppInstallationRepositories
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "github_app_installation_repositories" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AppInstallationRepositoriesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AppInstallationRepositoriesArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AppInstallationRepositoriesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppInstallationRepositoriesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppInstallationRepositoriesArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var appInstallationRepositoriesResource = new Github.AppInstallationRepositories("appInstallationRepositoriesResource", new()
{
InstallationId = "string",
SelectedRepositories = new[]
{
"string",
},
});
example, err := github.NewAppInstallationRepositories(ctx, "appInstallationRepositoriesResource", &github.AppInstallationRepositoriesArgs{
InstallationId: pulumi.String("string"),
SelectedRepositories: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "github_app_installation_repositories" "appInstallationRepositoriesResource" {
lifecycle {
create_before_destroy = true
}
installation_id = "string"
selected_repositories = ["string"]
}
var appInstallationRepositoriesResource = new AppInstallationRepositories("appInstallationRepositoriesResource", AppInstallationRepositoriesArgs.builder()
.installationId("string")
.selectedRepositories("string")
.build());
app_installation_repositories_resource = github.AppInstallationRepositories("appInstallationRepositoriesResource",
installation_id="string",
selected_repositories=["string"])
const appInstallationRepositoriesResource = new github.AppInstallationRepositories("appInstallationRepositoriesResource", {
installationId: "string",
selectedRepositories: ["string"],
});
type: github:AppInstallationRepositories
properties:
installationId: string
selectedRepositories:
- string
AppInstallationRepositories Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AppInstallationRepositories resource accepts the following input properties:
- Installation
Id string - The GitHub app installation id.
- Selected
Repositories List<string> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- Installation
Id string - The GitHub app installation id.
- Selected
Repositories []string A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation_
id string - The GitHub app installation id.
- selected_
repositories list(string) A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id String - The GitHub app installation id.
- selected
Repositories List<String> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id string - The GitHub app installation id.
- selected
Repositories string[] A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation_
id str - The GitHub app installation id.
- selected_
repositories Sequence[str] A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id String - The GitHub app installation id.
- selected
Repositories List<String> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppInstallationRepositories resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AppInstallationRepositories Resource
Get an existing AppInstallationRepositories resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AppInstallationRepositoriesState, opts?: CustomResourceOptions): AppInstallationRepositories@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
installation_id: Optional[str] = None,
selected_repositories: Optional[Sequence[str]] = None) -> AppInstallationRepositoriesfunc GetAppInstallationRepositories(ctx *Context, name string, id IDInput, state *AppInstallationRepositoriesState, opts ...ResourceOption) (*AppInstallationRepositories, error)public static AppInstallationRepositories Get(string name, Input<string> id, AppInstallationRepositoriesState? state, CustomResourceOptions? opts = null)public static AppInstallationRepositories get(String name, Output<String> id, AppInstallationRepositoriesState state, CustomResourceOptions options)resources: _: type: github:AppInstallationRepositories get: id: ${id}import {
to = github_app_installation_repositories.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Installation
Id string - The GitHub app installation id.
- Selected
Repositories List<string> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- Installation
Id string - The GitHub app installation id.
- Selected
Repositories []string A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation_
id string - The GitHub app installation id.
- selected_
repositories list(string) A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id String - The GitHub app installation id.
- selected
Repositories List<String> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id string - The GitHub app installation id.
- selected
Repositories string[] A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation_
id str - The GitHub app installation id.
- selected_
repositories Sequence[str] A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
- installation
Id String - The GitHub app installation id.
- selected
Repositories List<String> A list of repository names to install the app on.
Note: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource.
Import
GitHub App Installation Repositories can be imported using an ID made up of installationId, e.g.
$ pulumi import github:index/appInstallationRepositories:AppInstallationRepositories some_app_repos 1234567
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
published on Friday, Aug 14, 2026 by Pulumi