GitHub

Pulumi Official
Package maintained by Pulumi
v4.12.0 published on Thursday, May 26, 2022 by Pulumi

AppInstallationRepository

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.

Creating this resource installs a particular app on a particular repository.

The app installation and the repository must both belong to the same organization on GitHub. Note: you can review your organization’s installations by the following the instructions at this link.

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a repository.
        var someRepo = new Github.Repository("someRepo", new Github.RepositoryArgs
        {
        });
        var someAppRepo = new Github.AppInstallationRepository("someAppRepo", new Github.AppInstallationRepositoryArgs
        {
            InstallationId = "1234567",
            Repository = someRepo.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v4/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		someRepo, err := github.NewRepository(ctx, "someRepo", nil)
		if err != nil {
			return err
		}
		_, err = github.NewAppInstallationRepository(ctx, "someAppRepo", &github.AppInstallationRepositoryArgs{
			InstallationId: pulumi.String("1234567"),
			Repository:     someRepo.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_github as github

# Create a repository.
some_repo = github.Repository("someRepo")
some_app_repo = github.AppInstallationRepository("someAppRepo",
    installation_id="1234567",
    repository=some_repo.name)
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

// Create a repository.
const someRepo = new github.Repository("some_repo", {});
const someAppRepo = new github.AppInstallationRepository("some_app_repo", {
    // The installation id of the app (in the organization).
    installationId: "1234567",
    repository: someRepo.name,
});

Coming soon!

Create a AppInstallationRepository Resource

new AppInstallationRepository(name: string, args: AppInstallationRepositoryArgs, opts?: CustomResourceOptions);
@overload
def AppInstallationRepository(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              installation_id: Optional[str] = None,
                              repository: Optional[str] = None)
@overload
def AppInstallationRepository(resource_name: str,
                              args: AppInstallationRepositoryArgs,
                              opts: Optional[ResourceOptions] = None)
func NewAppInstallationRepository(ctx *Context, name string, args AppInstallationRepositoryArgs, opts ...ResourceOption) (*AppInstallationRepository, error)
public AppInstallationRepository(string name, AppInstallationRepositoryArgs args, CustomResourceOptions? opts = null)
public AppInstallationRepository(String name, AppInstallationRepositoryArgs args)
public AppInstallationRepository(String name, AppInstallationRepositoryArgs args, CustomResourceOptions options)
type: github:AppInstallationRepository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AppInstallationRepositoryArgs
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 AppInstallationRepositoryArgs
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 AppInstallationRepositoryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppInstallationRepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AppInstallationRepositoryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AppInstallationRepository Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppInstallationRepository resource accepts the following input properties:

InstallationId string

The GitHub app installation id.

Repository string

The repository to install the app on.

InstallationId string

The GitHub app installation id.

Repository string

The repository to install the app on.

installationId String

The GitHub app installation id.

repository String

The repository to install the app on.

installationId string

The GitHub app installation id.

repository string

The repository to install the app on.

installation_id str

The GitHub app installation id.

repository str

The repository to install the app on.

installationId String

The GitHub app installation id.

repository String

The repository to install the app on.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppInstallationRepository resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

RepoId int
Id string

The provider-assigned unique ID for this managed resource.

RepoId int
id String

The provider-assigned unique ID for this managed resource.

repoId Integer
id string

The provider-assigned unique ID for this managed resource.

repoId number
id str

The provider-assigned unique ID for this managed resource.

repo_id int
id String

The provider-assigned unique ID for this managed resource.

repoId Number

Look up an Existing AppInstallationRepository Resource

Get an existing AppInstallationRepository 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?: AppInstallationRepositoryState, opts?: CustomResourceOptions): AppInstallationRepository
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        installation_id: Optional[str] = None,
        repo_id: Optional[int] = None,
        repository: Optional[str] = None) -> AppInstallationRepository
func GetAppInstallationRepository(ctx *Context, name string, id IDInput, state *AppInstallationRepositoryState, opts ...ResourceOption) (*AppInstallationRepository, error)
public static AppInstallationRepository Get(string name, Input<string> id, AppInstallationRepositoryState? state, CustomResourceOptions? opts = null)
public static AppInstallationRepository get(String name, Output<String> id, AppInstallationRepositoryState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
InstallationId string

The GitHub app installation id.

RepoId int
Repository string

The repository to install the app on.

InstallationId string

The GitHub app installation id.

RepoId int
Repository string

The repository to install the app on.

installationId String

The GitHub app installation id.

repoId Integer
repository String

The repository to install the app on.

installationId string

The GitHub app installation id.

repoId number
repository string

The repository to install the app on.

installation_id str

The GitHub app installation id.

repo_id int
repository str

The repository to install the app on.

installationId String

The GitHub app installation id.

repoId Number
repository String

The repository to install the app on.

Import

GitHub App Installation Repository can be imported using an ID made up of installation_id:repository, e.g.

 $ pulumi import github:index/appInstallationRepository:AppInstallationRepository terraform_repo 1234567:terraform

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes

This Pulumi package is based on the github Terraform Provider.