RepositoryDeployKey

Provides a GitHub repository deploy key resource.

A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user account.

This resource allows you to add/remove repository deploy keys.

Further documentation on GitHub repository deploy keys: - About deploy keys

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        // Add a deploy key
        var exampleRepositoryDeployKey = new Github.RepositoryDeployKey("exampleRepositoryDeployKey", new Github.RepositoryDeployKeyArgs
        {
            Key = "ssh-rsa AAA...",
            ReadOnly = false,
            Repository = "test-repo",
            Title = "Repository test key",
        });
    }

}

Coming soon!

import pulumi
import pulumi_github as github

# Add a deploy key
example_repository_deploy_key = github.RepositoryDeployKey("exampleRepositoryDeployKey",
    key="ssh-rsa AAA...",
    read_only="false",
    repository="test-repo",
    title="Repository test key")
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

// Add a deploy key
const exampleRepositoryDeployKey = new github.RepositoryDeployKey("example_repository_deploy_key", {
    key: "ssh-rsa AAA...",
    readOnly: false,
    repository: "test-repo",
    title: "Repository test key",
});

Create a RepositoryDeployKey Resource

def RepositoryDeployKey(resource_name, opts=None, key=None, read_only=None, repository=None, title=None, __props__=None);
name string
The unique name of the resource.
args RepositoryDeployKeyArgs
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 RepositoryDeployKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RepositoryDeployKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RepositoryDeployKey Resource Properties

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

Inputs

The RepositoryDeployKey resource accepts the following input properties:

Key string

A SSH key.

Repository string

Name of the GitHub repository.

Title string

A title.

ReadOnly bool

A boolean qualifying the key to be either read only or read/write.

Key string

A SSH key.

Repository string

Name of the GitHub repository.

Title string

A title.

ReadOnly bool

A boolean qualifying the key to be either read only or read/write.

key string

A SSH key.

repository string

Name of the GitHub repository.

title string

A title.

readOnly boolean

A boolean qualifying the key to be either read only or read/write.

key str

A SSH key.

repository str

Name of the GitHub repository.

title str

A title.

read_only bool

A boolean qualifying the key to be either read only or read/write.

Outputs

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

Etag string
Id string
The provider-assigned unique ID for this managed resource.
Etag string
Id string
The provider-assigned unique ID for this managed resource.
etag string
id string
The provider-assigned unique ID for this managed resource.
etag str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing RepositoryDeployKey Resource

Get an existing RepositoryDeployKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, etag=None, key=None, read_only=None, repository=None, title=None, __props__=None);
func GetRepositoryDeployKey(ctx *Context, name string, id IDInput, state *RepositoryDeployKeyState, opts ...ResourceOption) (*RepositoryDeployKey, error)
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:

Etag string
Key string

A SSH key.

ReadOnly bool

A boolean qualifying the key to be either read only or read/write.

Repository string

Name of the GitHub repository.

Title string

A title.

Etag string
Key string

A SSH key.

ReadOnly bool

A boolean qualifying the key to be either read only or read/write.

Repository string

Name of the GitHub repository.

Title string

A title.

etag string
key string

A SSH key.

readOnly boolean

A boolean qualifying the key to be either read only or read/write.

repository string

Name of the GitHub repository.

title string

A title.

etag str
key str

A SSH key.

read_only bool

A boolean qualifying the key to be either read only or read/write.

repository str

Name of the GitHub repository.

title str

A title.

Package Details

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