Class RepositoryFile
This resource allows you to create and manage files within a GitHub repository.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var gitignore = new Github.RepositoryFile("gitignore", new Github.RepositoryFileArgs
{
Content = "**/*.tfstate",
File = ".gitignore",
Repository = "example",
});
}
}
Inherited Members
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class RepositoryFile : CustomResource
Constructors
View SourceRepositoryFile(String, RepositoryFileArgs, CustomResourceOptions)
Create a RepositoryFile resource with the given unique name, arguments, and options.
Declaration
public RepositoryFile(string name, RepositoryFileArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RepositoryFileArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBranch
Git branch (defaults to master).
The branch must already exist, it will not be created if it does not already exist.
Declaration
public Output<string> Branch { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CommitAuthor
Committer author name to use.
Declaration
public Output<string> CommitAuthor { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CommitEmail
Committer email address to use.
Declaration
public Output<string> CommitEmail { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CommitMessage
Commit message when adding or updating the managed file.
Declaration
public Output<string> CommitMessage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Content
The file content.
Declaration
public Output<string> Content { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
File
The path of the file to manage.
Declaration
public Output<string> File { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Repository
The repository name
Declaration
public Output<string> Repository { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Sha
The SHA blob of the file.
Declaration
public Output<string> Sha { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RepositoryFileState, CustomResourceOptions)
Get an existing RepositoryFile resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static RepositoryFile Get(string name, Input<string> id, RepositoryFileState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RepositoryFileState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| RepositoryFile |