@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
155 lines • 4.61 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides details about a specific Hetzner Cloud SSH Key.
*
* This resource is useful if you want to use a non-terraform managed SSH Key.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getSshKey({
* id: 24332897,
* });
* const byName = hcloud.getSshKey({
* name: "my-ssh-key",
* });
* const byFingerprint = hcloud.getSshKey({
* fingerprint: "55:58:dc:bd:61:6e:7d:24:07:a7:7d:9b:be:99:83:a8",
* });
* const byLabel = hcloud.getSshKey({
* withSelector: "key=value",
* });
* const main = new hcloud.Server("main", {sshKeys: [
* output(byId.then(byId => byId.id)).apply(x =>String(x)),
* output(byName.then(byName => byName.id)).apply(x =>String(x)),
* output(byFingerprint.then(byFingerprint => byFingerprint.id)).apply(x =>String(x)),
* ]});
* ```
*/
export declare function getSshKey(args?: GetSshKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetSshKeyResult>;
/**
* A collection of arguments for invoking getSshKey.
*/
export interface GetSshKeyArgs {
/**
* Fingerprint of the SSH Key.
*/
fingerprint?: string;
/**
* ID of the SSH Key.
*/
id?: number;
/**
* Name of the SSH Key.
*/
name?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
selector?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*/
withSelector?: string;
}
/**
* A collection of values returned by getSshKey.
*/
export interface GetSshKeyResult {
/**
* Fingerprint of the SSH Key.
*/
readonly fingerprint?: string;
/**
* ID of the SSH Key.
*/
readonly id?: number;
/**
* User-defined [labels](https://docs.hetzner.cloud/reference/cloud#labels) (key-value pairs) for the resource.
*/
readonly labels: {
[key: string]: string;
};
/**
* Name of the SSH Key.
*/
readonly name?: string;
/**
* Public key of the SSH Key pair.
*/
readonly publicKey: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
readonly selector?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*/
readonly withSelector?: string;
}
/**
* Provides details about a specific Hetzner Cloud SSH Key.
*
* This resource is useful if you want to use a non-terraform managed SSH Key.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getSshKey({
* id: 24332897,
* });
* const byName = hcloud.getSshKey({
* name: "my-ssh-key",
* });
* const byFingerprint = hcloud.getSshKey({
* fingerprint: "55:58:dc:bd:61:6e:7d:24:07:a7:7d:9b:be:99:83:a8",
* });
* const byLabel = hcloud.getSshKey({
* withSelector: "key=value",
* });
* const main = new hcloud.Server("main", {sshKeys: [
* output(byId.then(byId => byId.id)).apply(x =>String(x)),
* output(byName.then(byName => byName.id)).apply(x =>String(x)),
* output(byFingerprint.then(byFingerprint => byFingerprint.id)).apply(x =>String(x)),
* ]});
* ```
*/
export declare function getSshKeyOutput(args?: GetSshKeyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSshKeyResult>;
/**
* A collection of arguments for invoking getSshKey.
*/
export interface GetSshKeyOutputArgs {
/**
* Fingerprint of the SSH Key.
*/
fingerprint?: pulumi.Input<string | undefined>;
/**
* ID of the SSH Key.
*/
id?: pulumi.Input<number | undefined>;
/**
* Name of the SSH Key.
*/
name?: pulumi.Input<string | undefined>;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
selector?: pulumi.Input<string | undefined>;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*/
withSelector?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getSshKey.d.ts.map