UserSshKey

Provides a GitHub user’s SSH key resource.

This resource allows you to add/remove SSH keys from your user account.

Example Usage

using System.IO;
using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Github.UserSshKey("example", new Github.UserSshKeyArgs
        {
            Key = File.ReadAllText("~/.ssh/id_rsa.pub"),
            Title = "example title",
        });
    }

}

Coming soon!

import pulumi
import pulumi_github as github

example = github.UserSshKey("example",
    key=(lambda path: open(path).read())("~/.ssh/id_rsa.pub"),
    title="example title")
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as github from "@pulumi/github";

const example = new github.UserSshKey("example", {
    key: fs.readFileSync("~/.ssh/id_rsa.pub", "utf-8"),
    title: "example title",
});

Create a UserSshKey Resource

def UserSshKey(resource_name, opts=None, key=None, title=None, __props__=None);
func NewUserSshKey(ctx *Context, name string, args UserSshKeyArgs, opts ...ResourceOption) (*UserSshKey, error)
public UserSshKey(string name, UserSshKeyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args UserSshKeyArgs
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 UserSshKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserSshKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

UserSshKey Resource Properties

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

Inputs

The UserSshKey resource accepts the following input properties:

Key string

The public SSH key to add to your GitHub account.

Title string

A descriptive name for the new key. e.g. Personal MacBook Air

Key string

The public SSH key to add to your GitHub account.

Title string

A descriptive name for the new key. e.g. Personal MacBook Air

key string

The public SSH key to add to your GitHub account.

title string

A descriptive name for the new key. e.g. Personal MacBook Air

key str

The public SSH key to add to your GitHub account.

title str

A descriptive name for the new key. e.g. Personal MacBook Air

Outputs

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

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

The URL of the SSH key

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

The URL of the SSH key

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

The URL of the SSH key

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

The URL of the SSH key

Look up an Existing UserSshKey Resource

Get an existing UserSshKey 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?: UserSshKeyState, opts?: CustomResourceOptions): UserSshKey
static get(resource_name, id, opts=None, etag=None, key=None, title=None, url=None, __props__=None);
func GetUserSshKey(ctx *Context, name string, id IDInput, state *UserSshKeyState, opts ...ResourceOption) (*UserSshKey, error)
public static UserSshKey Get(string name, Input<string> id, UserSshKeyState? 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:

Etag string
Key string

The public SSH key to add to your GitHub account.

Title string

A descriptive name for the new key. e.g. Personal MacBook Air

Url string

The URL of the SSH key

Etag string
Key string

The public SSH key to add to your GitHub account.

Title string

A descriptive name for the new key. e.g. Personal MacBook Air

Url string

The URL of the SSH key

etag string
key string

The public SSH key to add to your GitHub account.

title string

A descriptive name for the new key. e.g. Personal MacBook Air

url string

The URL of the SSH key

etag str
key str

The public SSH key to add to your GitHub account.

title str

A descriptive name for the new key. e.g. Personal MacBook Air

url str

The URL of the SSH key

Package Details

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