Repository
Create a Repository Resource
new Repository(name: string, args?: RepositoryArgs, opts?: CustomResourceOptions);def Repository(resource_name, opts=None, allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, auto_init=None, default_branch=None, delete_branch_on_merge=None, description=None, gitignore_template=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, is_template=None, license_template=None, name=None, private=None, template=None, topics=None, visibility=None, __props__=None);func NewRepository(ctx *Context, name string, args *RepositoryArgs, opts ...ResourceOption) (*Repository, error)public Repository(string name, RepositoryArgs? args = null, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Repository Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Repository resource accepts the following input properties:
- 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.- 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 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.
- 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”.
- Name string
The name of the repository.
- Private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- Template
Repository
Template Args 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.
- 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.- 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 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.
- 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”.
- Name string
The name of the repository.
- Private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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.
- 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.- 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 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.
- 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”.
- name string
The name of the repository.
- private boolean
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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.
- 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.- 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 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.
- 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”.
- name str
The name of the repository.
- private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- template
Dict[Repository
Template] Use a template repository to create this resource. See Template Repositories below for details.
- topics List[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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- 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 URL to the repository on the web.
- 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 - 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.
- 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 URL to the repository on the web.
- 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 - 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.
- 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 URL to the repository on the web.
- 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 - 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.
- 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 URL to the repository on the web.
- 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 - 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.
Look up an 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): Repositorystatic get(resource_name, id, opts=None, allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, auto_init=None, default_branch=None, delete_branch_on_merge=None, description=None, etag=None, full_name=None, git_clone_url=None, gitignore_template=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, html_url=None, http_clone_url=None, is_template=None, license_template=None, name=None, node_id=None, private=None, ssh_clone_url=None, svn_url=None, template=None, topics=None, visibility=None, __props__=None);func 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)- 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.
The following state arguments are supported:
- 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.- 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 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 URL to the repository on the web.
- Http
Clone stringUrl URL that can be provided to
git cloneto clone the repository via HTTPS.- 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”.
- Name string
The name of the repository.
- Node
Id string - Private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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 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.
- 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.- 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 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 URL to the repository on the web.
- Http
Clone stringUrl URL that can be provided to
git cloneto clone the repository via HTTPS.- 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”.
- Name string
The name of the repository.
- Node
Id string - Private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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.
- 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.- 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 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 URL to the repository on the web.
- http
Clone stringUrl URL that can be provided to
git cloneto clone the repository via HTTPS.- 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”.
- name string
The name of the repository.
- node
Id string - private boolean
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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.
- 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.- 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 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 URL to the repository on the web.
- http_
clone_ strurl URL that can be provided to
git cloneto clone the repository via HTTPS.- 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”.
- name str
The name of the repository.
- node_
id str - private bool
Set to
trueto create a private repository. Repositories are created as public (e.g. open source) by default.- 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
Dict[Repository
Template] Use a template repository to create this resource. See Template Repositories below for details.
- topics List[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.
Supporting Types
RepositoryTemplate
Package Details
- Repository
- https://github.com/pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.