@cuemby/equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
132 lines (131 loc) • 4.65 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage User SSH keys on your Equinix Metal user account. If you create a new device in a project, all the keys of the project's collaborators will be injected to the device.
*
* The link between User SSH key and device is implicit. If you want to make sure that a key will be copied to a device, you must ensure that the device resource `dependsOn` the key resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * from "fs";
*
* // Create a new SSH key
* const key1 = new equinix.MetalSSHKey("key1", {publicKey: fs.readFileSync("/home/terraform/.ssh/id_rsa.pub")});
* // Create new device with "key1" included. The device resource "depends_on" the
* // key, in order to make sure the key is created before the device.
* const test = new equinix.MetalDevice("test", {
* hostname: "test-device",
* plan: "c3.small.x86",
* metro: "sv",
* operatingSystem: "ubuntu_20_04",
* billingCycle: "hourly",
* projectId: local.project_id,
* }, {
* dependsOn: ["equinix_metal_ssh_key.key1"],
* });
* ```
*
* ## Import
*
* This resource can be imported using an existing SSH Key ID
*
* ```sh
* $ pulumi import equinix:index/metalSSHKey:MetalSSHKey equinix_metal_ssh_key {existing_sshkey_id}
* ```
*/
export declare class MetalSSHKey extends pulumi.CustomResource {
/**
* Get an existing MetalSSHKey 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?: MetalSSHKeyState, opts?: pulumi.CustomResourceOptions): MetalSSHKey;
/**
* Returns true if the given object is an instance of MetalSSHKey. 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 MetalSSHKey;
/**
* The timestamp for when the SSH key was created.
*/
readonly created: pulumi.Output<string>;
/**
* The fingerprint of the SSH key.
*/
readonly fingerprint: pulumi.Output<string>;
/**
* The name of the SSH key for identification
*/
readonly name: pulumi.Output<string>;
/**
* The UUID of the Equinix Metal API User who owns this key.
*/
readonly ownerId: pulumi.Output<string>;
/**
* The public key. If this is a file, it
* can be read using the file interpolation function
*/
readonly publicKey: pulumi.Output<string>;
/**
* The timestamp for the last time the SSH key was updated.
*/
readonly updated: pulumi.Output<string>;
/**
* Create a MetalSSHKey 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: MetalSSHKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MetalSSHKey resources.
*/
export interface MetalSSHKeyState {
/**
* The timestamp for when the SSH key was created.
*/
created?: pulumi.Input<string>;
/**
* The fingerprint of the SSH key.
*/
fingerprint?: pulumi.Input<string>;
/**
* The name of the SSH key for identification
*/
name?: pulumi.Input<string>;
/**
* The UUID of the Equinix Metal API User who owns this key.
*/
ownerId?: pulumi.Input<string>;
/**
* The public key. If this is a file, it
* can be read using the file interpolation function
*/
publicKey?: pulumi.Input<string>;
/**
* The timestamp for the last time the SSH key was updated.
*/
updated?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MetalSSHKey resource.
*/
export interface MetalSSHKeyArgs {
/**
* The name of the SSH key for identification
*/
name?: pulumi.Input<string>;
/**
* The public key. If this is a file, it
* can be read using the file interpolation function
*/
publicKey: pulumi.Input<string>;
}