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
new UserSshKey(name: string, args: UserSshKeyArgs, opts?: CustomResourceOptions);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:
Outputs
All input properties are implicitly available as output properties. Additionally, the UserSshKey resource produces the following output properties:
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): UserSshKeystatic 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:
Package Details
- Repository
- https://github.com/pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.