UserSshKey

class UserSshKey : KotlinCustomResource

Provides a GitHub user's SSH key resource. This resource allows you to add/remove SSH keys from your user account.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.UserSshKey;
import com.pulumi.github.UserSshKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new UserSshKey("example", UserSshKeyArgs.builder()
.title("example title")
.key(Files.readString(Paths.get("~/.ssh/id_rsa.pub")))
.build());
}
}

Import

SSH keys can be imported using their ID e.g.

$ pulumi import github:index/userSshKey:UserSshKey example 1234567

Properties

Link copied to clipboard
val etag: Output<String>
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val key: Output<String>

The public SSH key to add to your GitHub account.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val title: Output<String>

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

Link copied to clipboard
val url: Output<String>

The URL of the SSH key

Link copied to clipboard
val urn: Output<String>