@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
111 lines (110 loc) • 3.65 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a Hetzner Cloud SSH Key resource to manage SSH Keys for server access.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
* import * as std from "@pulumi/std";
*
* const main = new hcloud.SshKey("main", {
* name: "my-ssh-key",
* publicKey: std.file({
* input: "~/.ssh/id_ed25519.pub",
* }).then(invoke => invoke.result),
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import hcloud:index/sshKey:SshKey example "$SSH_KEY_ID"
* ```
*/
export declare class SshKey extends pulumi.CustomResource {
/**
* Get an existing SshKey resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SshKeyState, opts?: pulumi.CustomResourceOptions): SshKey;
/**
* Returns true if the given object is an instance of SshKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is SshKey;
/**
* Fingerprint of the SSH public key.
*/
readonly fingerprint: pulumi.Output<string>;
/**
* User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Name of the SSH Key.
*/
readonly name: pulumi.Output<string>;
/**
* Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
*/
readonly publicKey: pulumi.Output<string>;
/**
* Create a SshKey resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SshKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SshKey resources.
*/
export interface SshKeyState {
/**
* Fingerprint of the SSH public key.
*/
fingerprint?: pulumi.Input<string>;
/**
* User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the SSH Key.
*/
name?: pulumi.Input<string>;
/**
* Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
*/
publicKey?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SshKey resource.
*/
export interface SshKeyArgs {
/**
* User-defined [labels](https://docs.hetzner.cloud/#labels) (key-value pairs) for the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Name of the SSH Key.
*/
name?: pulumi.Input<string>;
/**
* Public key of the SSH Key pair. If this is a file, it can be read using the `file` interpolation function.
*/
publicKey: pulumi.Input<string>;
}