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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_github as github

gitignore = github.RepositoryFile("gitignore",
    content="**/*.tfstate",
    file=".gitignore",
    repository="example")
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const gitignore = new github.RepositoryFile("gitignore", {
    content: "**/*.tfstate",
    file: ".gitignore",
    repository: "example",
});

Create a RepositoryFile Resource

def RepositoryFile(resource_name, opts=None, branch=None, commit_author=None, commit_email=None, commit_message=None, content=None, file=None, repository=None, __props__=None);
name string
The unique name of the resource.
args RepositoryFileArgs
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 RepositoryFileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RepositoryFileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RepositoryFile Resource Properties

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

Inputs

The RepositoryFile resource accepts the following input properties:

Content string

The file content.

File string

The path of the file to manage.

Repository string

The repository name

Branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

CommitAuthor string

Committer author name to use.

CommitEmail string

Committer email address to use.

CommitMessage string

Commit message when adding or updating the managed file.

Content string

The file content.

File string

The path of the file to manage.

Repository string

The repository name

Branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

CommitAuthor string

Committer author name to use.

CommitEmail string

Committer email address to use.

CommitMessage string

Commit message when adding or updating the managed file.

content string

The file content.

file string

The path of the file to manage.

repository string

The repository name

branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

commitAuthor string

Committer author name to use.

commitEmail string

Committer email address to use.

commitMessage string

Commit message when adding or updating the managed file.

content str

The file content.

file str

The path of the file to manage.

repository str

The repository name

branch str

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

commit_author str

Committer author name to use.

commit_email str

Committer email address to use.

commit_message str

Commit message when adding or updating the managed file.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Sha string

The SHA blob of the file.

Id string
The provider-assigned unique ID for this managed resource.
Sha string

The SHA blob of the file.

id string
The provider-assigned unique ID for this managed resource.
sha string

The SHA blob of the file.

id str
The provider-assigned unique ID for this managed resource.
sha str

The SHA blob of the file.

Look up an Existing RepositoryFile Resource

Get an existing RepositoryFile 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?: RepositoryFileState, opts?: CustomResourceOptions): RepositoryFile
static get(resource_name, id, opts=None, branch=None, commit_author=None, commit_email=None, commit_message=None, content=None, file=None, repository=None, sha=None, __props__=None);
func GetRepositoryFile(ctx *Context, name string, id IDInput, state *RepositoryFileState, opts ...ResourceOption) (*RepositoryFile, error)
public static RepositoryFile Get(string name, Input<string> id, RepositoryFileState? 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:

Branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

CommitAuthor string

Committer author name to use.

CommitEmail string

Committer email address to use.

CommitMessage string

Commit message when adding or updating the managed file.

Content string

The file content.

File string

The path of the file to manage.

Repository string

The repository name

Sha string

The SHA blob of the file.

Branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

CommitAuthor string

Committer author name to use.

CommitEmail string

Committer email address to use.

CommitMessage string

Commit message when adding or updating the managed file.

Content string

The file content.

File string

The path of the file to manage.

Repository string

The repository name

Sha string

The SHA blob of the file.

branch string

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

commitAuthor string

Committer author name to use.

commitEmail string

Committer email address to use.

commitMessage string

Commit message when adding or updating the managed file.

content string

The file content.

file string

The path of the file to manage.

repository string

The repository name

sha string

The SHA blob of the file.

branch str

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

commit_author str

Committer author name to use.

commit_email str

Committer email address to use.

commit_message str

Commit message when adding or updating the managed file.

content str

The file content.

file str

The path of the file to manage.

repository str

The repository name

sha str

The SHA blob of the file.

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.