published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
This resource allows you to create and manage repositories within your GitHub organization or personal account.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Description = "My awesome codebase",
Template = new Github.Inputs.RepositoryTemplateArgs
{
Owner = "github",
Repository = "terraform-module-template",
},
Visibility = "public",
});
});
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 {
_, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Description: pulumi.String("My awesome codebase"),
Template: &RepositoryTemplateArgs{
Owner: pulumi.String("github"),
Repository: pulumi.String("terraform-module-template"),
},
Visibility: pulumi.String("public"),
})
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.RepositoryArgs;
import com.pulumi.github.inputs.RepositoryTemplateArgs;
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 example = new Repository("example", RepositoryArgs.builder()
.description("My awesome codebase")
.template(RepositoryTemplateArgs.builder()
.owner("github")
.repository("terraform-module-template")
.build())
.visibility("public")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {
description: "My awesome codebase",
template: {
owner: "github",
repository: "terraform-module-template",
},
visibility: "public",
});
import pulumi
import pulumi_github as github
example = github.Repository("example",
description="My awesome codebase",
template=github.RepositoryTemplateArgs(
owner="github",
repository="terraform-module-template",
),
visibility="public")
resources:
example:
type: github:Repository
properties:
description: My awesome codebase
template:
owner: github
repository: terraform-module-template
visibility: public
With GitHub Pages Enabled
using System.Collections.Generic;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Repository("example", new()
{
Description = "My awesome web page",
Pages = new Github.Inputs.RepositoryPagesArgs
{
Source = new Github.Inputs.RepositoryPagesSourceArgs
{
Branch = "master",
Path = "/docs",
},
},
Private = false,
});
});
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 {
_, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Description: pulumi.String("My awesome web page"),
Pages: &RepositoryPagesArgs{
Source: &RepositoryPagesSourceArgs{
Branch: pulumi.String("master"),
Path: pulumi.String("/docs"),
},
},
Private: pulumi.Bool(false),
})
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.RepositoryArgs;
import com.pulumi.github.inputs.RepositoryPagesArgs;
import com.pulumi.github.inputs.RepositoryPagesSourceArgs;
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 example = new Repository("example", RepositoryArgs.builder()
.description("My awesome web page")
.pages(RepositoryPagesArgs.builder()
.source(RepositoryPagesSourceArgs.builder()
.branch("master")
.path("/docs")
.build())
.build())
.private_(false)
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {
description: "My awesome web page",
pages: {
source: {
branch: "master",
path: "/docs",
},
},
private: false,
});
import pulumi
import pulumi_github as github
example = github.Repository("example",
description="My awesome web page",
pages=github.RepositoryPagesArgs(
source=github.RepositoryPagesSourceArgs(
branch="master",
path="/docs",
),
),
private=False)
resources:
example:
type: github:Repository
properties:
description: My awesome web page
pages:
source:
branch: master
path: /docs
private: false
Create Repository Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Repository(name: string, args?: RepositoryArgs, opts?: CustomResourceOptions);@overload
def Repository(resource_name: str,
args: Optional[RepositoryArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Repository(resource_name: str,
opts: Optional[ResourceOptions] = None,
allow_auto_merge: Optional[bool] = None,
allow_merge_commit: Optional[bool] = None,
allow_rebase_merge: Optional[bool] = None,
allow_squash_merge: Optional[bool] = None,
archive_on_destroy: Optional[bool] = None,
archived: Optional[bool] = None,
auto_init: Optional[bool] = None,
default_branch: Optional[str] = None,
delete_branch_on_merge: Optional[bool] = None,
description: Optional[str] = None,
gitignore_template: Optional[str] = None,
has_downloads: Optional[bool] = None,
has_issues: Optional[bool] = None,
has_projects: Optional[bool] = None,
has_wiki: Optional[bool] = None,
homepage_url: Optional[str] = None,
ignore_vulnerability_alerts_during_read: Optional[bool] = None,
is_template: Optional[bool] = None,
license_template: Optional[str] = None,
merge_commit_message: Optional[str] = None,
merge_commit_title: Optional[str] = None,
name: Optional[str] = None,
pages: Optional[RepositoryPagesArgs] = None,
private: Optional[bool] = None,
squash_merge_commit_message: Optional[str] = None,
squash_merge_commit_title: Optional[str] = None,
template: Optional[RepositoryTemplateArgs] = None,
topics: Optional[Sequence[str]] = None,
visibility: Optional[str] = None,
vulnerability_alerts: Optional[bool] = None)func NewRepository(ctx *Context, name string, args *RepositoryArgs, opts ...ResourceOption) (*Repository, error)public Repository(string name, RepositoryArgs? args = null, CustomResourceOptions? opts = null)
public Repository(String name, RepositoryArgs args)
public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
type: github:Repository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RepositoryArgs
- 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 RepositoryArgs
- 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 RepositoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryArgs
- 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 repositoryResource = new Github.Repository("repositoryResource", new()
{
AllowAutoMerge = false,
AllowMergeCommit = false,
AllowRebaseMerge = false,
AllowSquashMerge = false,
ArchiveOnDestroy = false,
Archived = false,
AutoInit = false,
DeleteBranchOnMerge = false,
Description = "string",
GitignoreTemplate = "string",
HasDownloads = false,
HasIssues = false,
HasProjects = false,
HasWiki = false,
HomepageUrl = "string",
IgnoreVulnerabilityAlertsDuringRead = false,
IsTemplate = false,
LicenseTemplate = "string",
MergeCommitMessage = "string",
MergeCommitTitle = "string",
Name = "string",
Pages = new Github.Inputs.RepositoryPagesArgs
{
Source = new Github.Inputs.RepositoryPagesSourceArgs
{
Branch = "string",
Path = "string",
},
Cname = "string",
Custom404 = false,
HtmlUrl = "string",
Status = "string",
Url = "string",
},
SquashMergeCommitMessage = "string",
SquashMergeCommitTitle = "string",
Template = new Github.Inputs.RepositoryTemplateArgs
{
Owner = "string",
Repository = "string",
},
Topics = new[]
{
"string",
},
Visibility = "string",
VulnerabilityAlerts = false,
});
example, err := github.NewRepository(ctx, "repositoryResource", &github.RepositoryArgs{
AllowAutoMerge: pulumi.Bool(false),
AllowMergeCommit: pulumi.Bool(false),
AllowRebaseMerge: pulumi.Bool(false),
AllowSquashMerge: pulumi.Bool(false),
ArchiveOnDestroy: pulumi.Bool(false),
Archived: pulumi.Bool(false),
AutoInit: pulumi.Bool(false),
DeleteBranchOnMerge: pulumi.Bool(false),
Description: pulumi.String("string"),
GitignoreTemplate: pulumi.String("string"),
HasDownloads: pulumi.Bool(false),
HasIssues: pulumi.Bool(false),
HasProjects: pulumi.Bool(false),
HasWiki: pulumi.Bool(false),
HomepageUrl: pulumi.String("string"),
IgnoreVulnerabilityAlertsDuringRead: pulumi.Bool(false),
IsTemplate: pulumi.Bool(false),
LicenseTemplate: pulumi.String("string"),
MergeCommitMessage: pulumi.String("string"),
MergeCommitTitle: pulumi.String("string"),
Name: pulumi.String("string"),
Pages: &github.RepositoryPagesArgs{
Source: &github.RepositoryPagesSourceArgs{
Branch: pulumi.String("string"),
Path: pulumi.String("string"),
},
Cname: pulumi.String("string"),
Custom404: pulumi.Bool(false),
HtmlUrl: pulumi.String("string"),
Status: pulumi.String("string"),
Url: pulumi.String("string"),
},
SquashMergeCommitMessage: pulumi.String("string"),
SquashMergeCommitTitle: pulumi.String("string"),
Template: &github.RepositoryTemplateArgs{
Owner: pulumi.String("string"),
Repository: pulumi.String("string"),
},
Topics: pulumi.StringArray{
pulumi.String("string"),
},
Visibility: pulumi.String("string"),
VulnerabilityAlerts: pulumi.Bool(false),
})
var repositoryResource = new Repository("repositoryResource", RepositoryArgs.builder()
.allowAutoMerge(false)
.allowMergeCommit(false)
.allowRebaseMerge(false)
.allowSquashMerge(false)
.archiveOnDestroy(false)
.archived(false)
.autoInit(false)
.deleteBranchOnMerge(false)
.description("string")
.gitignoreTemplate("string")
.hasDownloads(false)
.hasIssues(false)
.hasProjects(false)
.hasWiki(false)
.homepageUrl("string")
.ignoreVulnerabilityAlertsDuringRead(false)
.isTemplate(false)
.licenseTemplate("string")
.mergeCommitMessage("string")
.mergeCommitTitle("string")
.name("string")
.pages(RepositoryPagesArgs.builder()
.source(RepositoryPagesSourceArgs.builder()
.branch("string")
.path("string")
.build())
.cname("string")
.custom404(false)
.htmlUrl("string")
.status("string")
.url("string")
.build())
.squashMergeCommitMessage("string")
.squashMergeCommitTitle("string")
.template(RepositoryTemplateArgs.builder()
.owner("string")
.repository("string")
.build())
.topics("string")
.visibility("string")
.vulnerabilityAlerts(false)
.build());
repository_resource = github.Repository("repositoryResource",
allow_auto_merge=False,
allow_merge_commit=False,
allow_rebase_merge=False,
allow_squash_merge=False,
archive_on_destroy=False,
archived=False,
auto_init=False,
delete_branch_on_merge=False,
description="string",
gitignore_template="string",
has_downloads=False,
has_issues=False,
has_projects=False,
has_wiki=False,
homepage_url="string",
ignore_vulnerability_alerts_during_read=False,
is_template=False,
license_template="string",
merge_commit_message="string",
merge_commit_title="string",
name="string",
pages={
"source": {
"branch": "string",
"path": "string",
},
"cname": "string",
"custom404": False,
"html_url": "string",
"status": "string",
"url": "string",
},
squash_merge_commit_message="string",
squash_merge_commit_title="string",
template={
"owner": "string",
"repository": "string",
},
topics=["string"],
visibility="string",
vulnerability_alerts=False)
const repositoryResource = new github.Repository("repositoryResource", {
allowAutoMerge: false,
allowMergeCommit: false,
allowRebaseMerge: false,
allowSquashMerge: false,
archiveOnDestroy: false,
archived: false,
autoInit: false,
deleteBranchOnMerge: false,
description: "string",
gitignoreTemplate: "string",
hasDownloads: false,
hasIssues: false,
hasProjects: false,
hasWiki: false,
homepageUrl: "string",
ignoreVulnerabilityAlertsDuringRead: false,
isTemplate: false,
licenseTemplate: "string",
mergeCommitMessage: "string",
mergeCommitTitle: "string",
name: "string",
pages: {
source: {
branch: "string",
path: "string",
},
cname: "string",
custom404: false,
htmlUrl: "string",
status: "string",
url: "string",
},
squashMergeCommitMessage: "string",
squashMergeCommitTitle: "string",
template: {
owner: "string",
repository: "string",
},
topics: ["string"],
visibility: "string",
vulnerabilityAlerts: false,
});
type: github:Repository
properties:
allowAutoMerge: false
allowMergeCommit: false
allowRebaseMerge: false
allowSquashMerge: false
archiveOnDestroy: false
archived: false
autoInit: false
deleteBranchOnMerge: false
description: string
gitignoreTemplate: string
hasDownloads: false
hasIssues: false
hasProjects: false
hasWiki: false
homepageUrl: string
ignoreVulnerabilityAlertsDuringRead: false
isTemplate: false
licenseTemplate: string
mergeCommitMessage: string
mergeCommitTitle: string
name: string
pages:
cname: string
custom404: false
htmlUrl: string
source:
branch: string
path: string
status: string
url: string
squashMergeCommitMessage: string
squashMergeCommitTitle: string
template:
owner: string
repository: string
topics:
- string
visibility: string
vulnerabilityAlerts: false
Repository 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 Repository resource accepts the following input properties:
- Allow
Auto boolMerge - Set to
trueto allow auto-merging pull requests on the repository. - Allow
Merge boolCommit - Set to
falseto disable merge commits on the repository. - Allow
Rebase boolMerge - Set to
falseto disable rebase merges on the repository. - Allow
Squash boolMerge - Set to
falseto disable squash merges on the repository. - Archive
On boolDestroy - Set to
trueto archive the repository instead of deleting on destroy. - Archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - Auto
Init bool - Set to
trueto produce an initial commit in the repository. - Default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - Delete
Branch boolOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - Description string
- A description of the repository.
- Gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- Has
Downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - Has
Issues bool - Set to
trueto enable the GitHub Issues features on the repository. - Has
Projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - Has
Wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - Homepage
Url string - URL of a page describing the project.
- Ignore
Vulnerability boolAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - Is
Template bool - Set to
trueto tell GitHub that this is a template repository. - License
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- Merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - Merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - Name string
- The name of the repository.
- Pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- Private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - Squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - Squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - Template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- Topics List<string>
- The list of topics of the repository.
- Visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - Vulnerability
Alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- Allow
Auto boolMerge - Set to
trueto allow auto-merging pull requests on the repository. - Allow
Merge boolCommit - Set to
falseto disable merge commits on the repository. - Allow
Rebase boolMerge - Set to
falseto disable rebase merges on the repository. - Allow
Squash boolMerge - Set to
falseto disable squash merges on the repository. - Archive
On boolDestroy - Set to
trueto archive the repository instead of deleting on destroy. - Archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - Auto
Init bool - Set to
trueto produce an initial commit in the repository. - Default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - Delete
Branch boolOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - Description string
- A description of the repository.
- Gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- Has
Downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - Has
Issues bool - Set to
trueto enable the GitHub Issues features on the repository. - Has
Projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - Has
Wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - Homepage
Url string - URL of a page describing the project.
- Ignore
Vulnerability boolAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - Is
Template bool - Set to
trueto tell GitHub that this is a template repository. - License
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- Merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - Merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - Name string
- The name of the repository.
- Pages
Repository
Pages Args - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- Private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - Squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - Squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - Template
Repository
Template Args - Use a template repository to create this resource. See Template Repositories below for details.
- Topics []string
- The list of topics of the repository.
- Visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - Vulnerability
Alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto BooleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge BooleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase BooleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash BooleanMerge - Set to
falseto disable squash merges on the repository. - archive
On BooleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived Boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init Boolean - Set to
trueto produce an initial commit in the repository. - default
Branch String - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch BooleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description String
- A description of the repository.
- gitignore
Template String - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads Boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues Boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects Boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki Boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url String - URL of a page describing the project.
- ignore
Vulnerability BooleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template Boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template String - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit StringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit StringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name String
- The name of the repository.
- pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private_ Boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - squash
Merge StringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge StringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- topics List<String>
- The list of topics of the repository.
- visibility String
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts Boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto booleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge booleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase booleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash booleanMerge - Set to
falseto disable squash merges on the repository. - archive
On booleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init boolean - Set to
trueto produce an initial commit in the repository. - default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch booleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description string
- A description of the repository.
- gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url string - URL of a page describing the project.
- ignore
Vulnerability booleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name string
- The name of the repository.
- pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- topics string[]
- The list of topics of the repository.
- visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow_
auto_ boolmerge - Set to
trueto allow auto-merging pull requests on the repository. - allow_
merge_ boolcommit - Set to
falseto disable merge commits on the repository. - allow_
rebase_ boolmerge - Set to
falseto disable rebase merges on the repository. - allow_
squash_ boolmerge - Set to
falseto disable squash merges on the repository. - archive_
on_ booldestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto_
init bool - Set to
trueto produce an initial commit in the repository. - default_
branch str - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete_
branch_ boolon_ merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description str
- A description of the repository.
- gitignore_
template str - Use the name of the template without the extension. For example, "Haskell".
- has_
downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - has_
issues bool - Set to
trueto enable the GitHub Issues features on the repository. - has_
projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has_
wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - homepage_
url str - URL of a page describing the project.
- ignore_
vulnerability_ boolalerts_ during_ read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is_
template bool - Set to
trueto tell GitHub that this is a template repository. - license_
template str - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge_
commit_ strmessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge_
commit_ strtitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name str
- The name of the repository.
- pages
Repository
Pages Args - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - squash_
merge_ strcommit_ message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash_
merge_ strcommit_ title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - template
Repository
Template Args - Use a template repository to create this resource. See Template Repositories below for details.
- topics Sequence[str]
- The list of topics of the repository.
- visibility str
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability_
alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto BooleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge BooleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase BooleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash BooleanMerge - Set to
falseto disable squash merges on the repository. - archive
On BooleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived Boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init Boolean - Set to
trueto produce an initial commit in the repository. - default
Branch String - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch BooleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description String
- A description of the repository.
- gitignore
Template String - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads Boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues Boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects Boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki Boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url String - URL of a page describing the project.
- ignore
Vulnerability BooleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template Boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template String - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit StringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit StringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name String
- The name of the repository.
- pages Property Map
- The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private Boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - squash
Merge StringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge StringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - template Property Map
- Use a template repository to create this resource. See Template Repositories below for details.
- topics List<String>
- The list of topics of the repository.
- visibility String
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts Boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- Branches
List<Repository
Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - Etag string
- Full
Name string - A string of the form "orgname/reponame".
- Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Id string
- The provider-assigned unique ID for this managed resource.
- Node
Id string - GraphQL global node id for use with v4 API
- Repo
Id int - GitHub ID for the repository
- Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
- Branches
[]Repository
Branch - The list of this repository's branches. Each element of
brancheshas the following attributes: - Etag string
- Full
Name string - A string of the form "orgname/reponame".
- Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Id string
- The provider-assigned unique ID for this managed resource.
- Node
Id string - GraphQL global node id for use with v4 API
- Repo
Id int - GitHub ID for the repository
- Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
- branches
List<Repository
Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - etag String
- full
Name String - A string of the form "orgname/reponame".
- git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id String
- The provider-assigned unique ID for this managed resource.
- node
Id String - GraphQL global node id for use with v4 API
- repo
Id Integer - GitHub ID for the repository
- ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
- branches
Repository
Branch[] - The list of this repository's branches. Each element of
brancheshas the following attributes: - etag string
- full
Name string - A string of the form "orgname/reponame".
- git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id string
- The provider-assigned unique ID for this managed resource.
- node
Id string - GraphQL global node id for use with v4 API
- repo
Id number - GitHub ID for the repository
- ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
- branches
Sequence[Repository
Branch] - The list of this repository's branches. Each element of
brancheshas the following attributes: - etag str
- full_
name str - A string of the form "orgname/reponame".
- git_
clone_ strurl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - html_
url str - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id str
- The provider-assigned unique ID for this managed resource.
- node_
id str - GraphQL global node id for use with v4 API
- repo_
id int - GitHub ID for the repository
- ssh_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via SSH. - svn_
url str - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
- branches List<Property Map>
- The list of this repository's branches. Each element of
brancheshas the following attributes: - etag String
- full
Name String - A string of the form "orgname/reponame".
- git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - id String
- The provider-assigned unique ID for this managed resource.
- node
Id String - GraphQL global node id for use with v4 API
- repo
Id Number - GitHub ID for the repository
- ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation.
Look up Existing Repository Resource
Get an existing Repository 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?: RepositoryState, opts?: CustomResourceOptions): Repository@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_auto_merge: Optional[bool] = None,
allow_merge_commit: Optional[bool] = None,
allow_rebase_merge: Optional[bool] = None,
allow_squash_merge: Optional[bool] = None,
archive_on_destroy: Optional[bool] = None,
archived: Optional[bool] = None,
auto_init: Optional[bool] = None,
branches: Optional[Sequence[RepositoryBranchArgs]] = None,
default_branch: Optional[str] = None,
delete_branch_on_merge: Optional[bool] = None,
description: Optional[str] = None,
etag: Optional[str] = None,
full_name: Optional[str] = None,
git_clone_url: Optional[str] = None,
gitignore_template: Optional[str] = None,
has_downloads: Optional[bool] = None,
has_issues: Optional[bool] = None,
has_projects: Optional[bool] = None,
has_wiki: Optional[bool] = None,
homepage_url: Optional[str] = None,
html_url: Optional[str] = None,
http_clone_url: Optional[str] = None,
ignore_vulnerability_alerts_during_read: Optional[bool] = None,
is_template: Optional[bool] = None,
license_template: Optional[str] = None,
merge_commit_message: Optional[str] = None,
merge_commit_title: Optional[str] = None,
name: Optional[str] = None,
node_id: Optional[str] = None,
pages: Optional[RepositoryPagesArgs] = None,
private: Optional[bool] = None,
repo_id: Optional[int] = None,
squash_merge_commit_message: Optional[str] = None,
squash_merge_commit_title: Optional[str] = None,
ssh_clone_url: Optional[str] = None,
svn_url: Optional[str] = None,
template: Optional[RepositoryTemplateArgs] = None,
topics: Optional[Sequence[str]] = None,
visibility: Optional[str] = None,
vulnerability_alerts: Optional[bool] = None) -> Repositoryfunc GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)public static Repository get(String name, Output<String> id, RepositoryState state, CustomResourceOptions options)resources: _: type: github:Repository get: 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.
- Allow
Auto boolMerge - Set to
trueto allow auto-merging pull requests on the repository. - Allow
Merge boolCommit - Set to
falseto disable merge commits on the repository. - Allow
Rebase boolMerge - Set to
falseto disable rebase merges on the repository. - Allow
Squash boolMerge - Set to
falseto disable squash merges on the repository. - Archive
On boolDestroy - Set to
trueto archive the repository instead of deleting on destroy. - Archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - Auto
Init bool - Set to
trueto produce an initial commit in the repository. - Branches
List<Repository
Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - Default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - Delete
Branch boolOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - Description string
- A description of the repository.
- Etag string
- Full
Name string - A string of the form "orgname/reponame".
- Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- Has
Downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - Has
Issues bool - Set to
trueto enable the GitHub Issues features on the repository. - Has
Projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - Has
Wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - Homepage
Url string - URL of a page describing the project.
- Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Ignore
Vulnerability boolAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - Is
Template bool - Set to
trueto tell GitHub that this is a template repository. - License
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- Merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - Merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - Name string
- The name of the repository.
- Node
Id string - GraphQL global node id for use with v4 API
- Pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- Private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - Repo
Id int - GitHub ID for the repository
- Squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - Squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - Template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- Topics List<string>
- The list of topics of the repository.
- Visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - Vulnerability
Alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- Allow
Auto boolMerge - Set to
trueto allow auto-merging pull requests on the repository. - Allow
Merge boolCommit - Set to
falseto disable merge commits on the repository. - Allow
Rebase boolMerge - Set to
falseto disable rebase merges on the repository. - Allow
Squash boolMerge - Set to
falseto disable squash merges on the repository. - Archive
On boolDestroy - Set to
trueto archive the repository instead of deleting on destroy. - Archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - Auto
Init bool - Set to
trueto produce an initial commit in the repository. - Branches
[]Repository
Branch Args - The list of this repository's branches. Each element of
brancheshas the following attributes: - Default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - Delete
Branch boolOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - Description string
- A description of the repository.
- Etag string
- Full
Name string - A string of the form "orgname/reponame".
- Git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - Gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- Has
Downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - Has
Issues bool - Set to
trueto enable the GitHub Issues features on the repository. - Has
Projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - Has
Wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - Homepage
Url string - URL of a page describing the project.
- Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - Ignore
Vulnerability boolAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - Is
Template bool - Set to
trueto tell GitHub that this is a template repository. - License
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- Merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - Merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - Name string
- The name of the repository.
- Node
Id string - GraphQL global node id for use with v4 API
- Pages
Repository
Pages Args - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- Private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - Repo
Id int - GitHub ID for the repository
- Squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - Squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - Ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - Svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - Template
Repository
Template Args - Use a template repository to create this resource. See Template Repositories below for details.
- Topics []string
- The list of topics of the repository.
- Visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - Vulnerability
Alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto BooleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge BooleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase BooleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash BooleanMerge - Set to
falseto disable squash merges on the repository. - archive
On BooleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived Boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init Boolean - Set to
trueto produce an initial commit in the repository. - branches
List<Repository
Branch> - The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch String - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch BooleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description String
- A description of the repository.
- etag String
- full
Name String - A string of the form "orgname/reponame".
- git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - gitignore
Template String - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads Boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues Boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects Boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki Boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url String - URL of a page describing the project.
- html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - ignore
Vulnerability BooleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template Boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template String - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit StringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit StringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name String
- The name of the repository.
- node
Id String - GraphQL global node id for use with v4 API
- pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private_ Boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - repo
Id Integer - GitHub ID for the repository
- squash
Merge StringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge StringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- topics List<String>
- The list of topics of the repository.
- visibility String
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts Boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto booleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge booleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase booleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash booleanMerge - Set to
falseto disable squash merges on the repository. - archive
On booleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init boolean - Set to
trueto produce an initial commit in the repository. - branches
Repository
Branch[] - The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch string - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch booleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description string
- A description of the repository.
- etag string
- full
Name string - A string of the form "orgname/reponame".
- git
Clone stringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - gitignore
Template string - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url string - URL of a page describing the project.
- html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - ignore
Vulnerability booleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template string - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit stringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit stringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name string
- The name of the repository.
- node
Id string - GraphQL global node id for use with v4 API
- pages
Repository
Pages - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - repo
Id number - GitHub ID for the repository
- squash
Merge stringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge stringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - ssh
Clone stringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url string - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - template
Repository
Template - Use a template repository to create this resource. See Template Repositories below for details.
- topics string[]
- The list of topics of the repository.
- visibility string
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow_
auto_ boolmerge - Set to
trueto allow auto-merging pull requests on the repository. - allow_
merge_ boolcommit - Set to
falseto disable merge commits on the repository. - allow_
rebase_ boolmerge - Set to
falseto disable rebase merges on the repository. - allow_
squash_ boolmerge - Set to
falseto disable squash merges on the repository. - archive_
on_ booldestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived bool
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto_
init bool - Set to
trueto produce an initial commit in the repository. - branches
Sequence[Repository
Branch Args] - The list of this repository's branches. Each element of
brancheshas the following attributes: - default_
branch str - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete_
branch_ boolon_ merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description str
- A description of the repository.
- etag str
- full_
name str - A string of the form "orgname/reponame".
- git_
clone_ strurl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - gitignore_
template str - Use the name of the template without the extension. For example, "Haskell".
- has_
downloads bool - Set to
trueto enable the (deprecated) downloads features on the repository. - has_
issues bool - Set to
trueto enable the GitHub Issues features on the repository. - has_
projects bool - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has_
wiki bool - Set to
trueto enable the GitHub Wiki features on the repository. - homepage_
url str - URL of a page describing the project.
- html_
url str - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via HTTPS. - ignore_
vulnerability_ boolalerts_ during_ read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is_
template bool - Set to
trueto tell GitHub that this is a template repository. - license_
template str - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge_
commit_ strmessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge_
commit_ strtitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name str
- The name of the repository.
- node_
id str - GraphQL global node id for use with v4 API
- pages
Repository
Pages Args - The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private bool
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - repo_
id int - GitHub ID for the repository
- squash_
merge_ strcommit_ message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash_
merge_ strcommit_ title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - ssh_
clone_ strurl - URL that can be provided to
git cloneto clone the repository via SSH. - svn_
url str - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - template
Repository
Template Args - Use a template repository to create this resource. See Template Repositories below for details.
- topics Sequence[str]
- The list of topics of the repository.
- visibility str
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability_
alerts bool - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
- allow
Auto BooleanMerge - Set to
trueto allow auto-merging pull requests on the repository. - allow
Merge BooleanCommit - Set to
falseto disable merge commits on the repository. - allow
Rebase BooleanMerge - Set to
falseto disable rebase merges on the repository. - allow
Squash BooleanMerge - Set to
falseto disable squash merges on the repository. - archive
On BooleanDestroy - Set to
trueto archive the repository instead of deleting on destroy. - archived Boolean
- Specifies if the repository should be archived. Defaults to
false. NOTE Currently, the API does not support unarchiving. - auto
Init Boolean - Set to
trueto produce an initial commit in the repository. - branches List<Property Map>
- The list of this repository's branches. Each element of
brancheshas the following attributes: - default
Branch String - (Deprecated: Use
github.BranchDefaultresource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. - delete
Branch BooleanOn Merge - Automatically delete head branch after a pull request is merged. Defaults to
false. - description String
- A description of the repository.
- etag String
- full
Name String - A string of the form "orgname/reponame".
- git
Clone StringUrl - URL that can be provided to
git cloneto clone the repository anonymously via the git protocol. - gitignore
Template String - Use the name of the template without the extension. For example, "Haskell".
- has
Downloads Boolean - Set to
trueto enable the (deprecated) downloads features on the repository. - has
Issues Boolean - Set to
trueto enable the GitHub Issues features on the repository. - has
Projects Boolean - Set to
trueto enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default tofalseand will otherwise default totrue. If you specifytruewhen it has been disabled it will return an error. - has
Wiki Boolean - Set to
trueto enable the GitHub Wiki features on the repository. - homepage
Url String - URL of a page describing the project.
- html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - http
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via HTTPS. - ignore
Vulnerability BooleanAlerts During Read - Set to
trueto not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. - is
Template Boolean - Set to
trueto tell GitHub that this is a template repository. - license
Template String - Use the name of the template without the extension. For example, "mit" or "mpl-2.0".
- merge
Commit StringMessage - Can be
PR_BODY,PR_TITLE, orBLANKfor a default merge commit message. - merge
Commit StringTitle - Can be
PR_TITLEorMERGE_MESSAGEfor a default merge commit title. - name String
- The name of the repository.
- node
Id String - GraphQL global node id for use with v4 API
- pages Property Map
- The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details.
- private Boolean
- Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default. - repo
Id Number - GitHub ID for the repository
- squash
Merge StringCommit Message - Can be
PR_BODY,COMMIT_MESSAGES, orBLANKfor a default squash merge commit message. - squash
Merge StringCommit Title - Can be
PR_TITLEorCOMMIT_OR_PR_TITLEfor a default squash merge commit title. - ssh
Clone StringUrl - URL that can be provided to
git cloneto clone the repository via SSH. - svn
Url String - URL that can be provided to
svn checkoutto check out the repository via GitHub's Subversion protocol emulation. - template Property Map
- Use a template repository to create this resource. See Template Repositories below for details.
- topics List<String>
- The list of topics of the repository.
- visibility String
- Can be
publicorprivate. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also beinternal. Thevisibilityparameter overrides theprivateparameter. - vulnerability
Alerts Boolean - Set to
trueto enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings.
Supporting Types
RepositoryBranch, RepositoryBranchArgs
- name String
- The name of the repository.
- protected_ Boolean
- Whether the branch is protected.
RepositoryPages, RepositoryPagesArgs
- Source
Repository
Pages Source - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- Cname string
- The custom domain for the repository. This can only be set after the repository has been created.
- Custom404 bool
- Whether the rendered GitHub Pages site has a custom 404 page.
- Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Status string
- The GitHub Pages site's build status e.g.
buildingorbuilt. - Url string
- Source
Repository
Pages Source - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- Cname string
- The custom domain for the repository. This can only be set after the repository has been created.
- Custom404 bool
- Whether the rendered GitHub Pages site has a custom 404 page.
- Html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - Status string
- The GitHub Pages site's build status e.g.
buildingorbuilt. - Url string
- source
Repository
Pages Source - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- cname String
- The custom domain for the repository. This can only be set after the repository has been created.
- custom404 Boolean
- Whether the rendered GitHub Pages site has a custom 404 page.
- html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - status String
- The GitHub Pages site's build status e.g.
buildingorbuilt. - url String
- source
Repository
Pages Source - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- cname string
- The custom domain for the repository. This can only be set after the repository has been created.
- custom404 boolean
- Whether the rendered GitHub Pages site has a custom 404 page.
- html
Url string - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - status string
- The GitHub Pages site's build status e.g.
buildingorbuilt. - url string
- source
Repository
Pages Source - The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- cname str
- The custom domain for the repository. This can only be set after the repository has been created.
- custom404 bool
- Whether the rendered GitHub Pages site has a custom 404 page.
- html_
url str - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - status str
- The GitHub Pages site's build status e.g.
buildingorbuilt. - url str
- source Property Map
- The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details.
- cname String
- The custom domain for the repository. This can only be set after the repository has been created.
- custom404 Boolean
- Whether the rendered GitHub Pages site has a custom 404 page.
- html
Url String - The absolute URL (including scheme) of the rendered GitHub Pages site e.g.
https://username.github.io. - status String
- The GitHub Pages site's build status e.g.
buildingorbuilt. - url String
RepositoryPagesSource, RepositoryPagesSourceArgs
RepositoryTemplate, RepositoryTemplateArgs
- Owner string
- Repository string
- Owner string
- Repository string
- owner String
- repository String
- owner string
- repository string
- owner str
- repository str
- owner String
- repository String
Import
Repositories can be imported using the name, e.g.
$ pulumi import github:index/repository:Repository terraform terraform
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 Monday, Mar 9, 2026 by Pulumi
