github.AppInstallationRepository
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Create a repository.
var someRepo = new Github.Repository("someRepo");
var someAppRepo = new Github.AppInstallationRepository("someAppRepo", new()
{
InstallationId = "1234567",
Repository = someRepo.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v5/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
})
}
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.AppInstallationRepository;
import com.pulumi.github.AppInstallationRepositoryArgs;
import java.util.List;
import java.util.ArrayList;
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) {
var someRepo = new Repository("someRepo");
var someAppRepo = new AppInstallationRepository("someAppRepo", AppInstallationRepositoryArgs.builder()
.installationId("1234567")
.repository(someRepo.name())
.build());
}
}
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("someRepo", {});
const someAppRepo = new github.AppInstallationRepository("someAppRepo", {
installationId: "1234567",
repository: someRepo.name,
});
resources:
# Create a repository.
someRepo:
type: github:Repository
someAppRepo:
type: github:AppInstallationRepository
properties:
# The installation id of the app (in the organization).
installationId: '1234567'
repository: ${someRepo.name}
Create 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:
- Installation
Id string The GitHub app installation id.
- Repository string
The repository to install the app on.
- Installation
Id string The GitHub app installation id.
- Repository string
The repository to install the app on.
- installation
Id String The GitHub app installation id.
- repository String
The repository to install the app on.
- installation
Id 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.
- installation
Id 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:
Look up 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.
- Installation
Id string The GitHub app installation id.
- Repo
Id int - Repository string
The repository to install the app on.
- Installation
Id string The GitHub app installation id.
- Repo
Id int - Repository string
The repository to install the app on.
- installation
Id String The GitHub app installation id.
- repo
Id Integer - repository String
The repository to install the app on.
- installation
Id string The GitHub app installation id.
- repo
Id 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.
- installation
Id String The GitHub app installation id.
- repo
Id 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
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
github
Terraform Provider.