UNPKG

@cuemby/equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

94 lines 4.96 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.MetalProjectSSHKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides an Equinix Metal project SSH key resource to manage project-specific SSH keys. * Project SSH keys will only be populated onto servers that belong to that project, in contrast to * User SSH Keys. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@cuemby/equinix"; * * const projectId = "<UUID_of_your_project>"; * const testMetalProjectSSHKey = new equinix.MetalProjectSSHKey("testMetalProjectSSHKey", { * publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDM/unxJeFqxsTJcu6mhqsMHSaVlpu+Jj/P+44zrm6X/MAoHSX3X9oLgujEjjZ74yLfdfe0bJrbL2YgJzNaEkIQQ1VPMHB5EhTKUBGnzlPP0hHTnxsjAm9qDHgUPgvgFDQSAMzdJRJ0Cexo16Ph9VxCoLh3dxiE7s2gaM2FdVg7P8aSxKypsxAhYV3D0AwqzoOyT6WWhBoQ0xZ85XevOTnJCpImSemEGs6nVGEsWcEc1d1YvdxFjAK4SdsKUMkj4Dsy/leKsdi/DEAf356vbMT1UHsXXvy5TlHu/Pa6qF53v32Enz+nhKy7/8W2Yt2yWx8HnQcT2rug9lvCXagJO6oauqRTO77C4QZn13ZLMZgLT66S/tNh2EX0gi6vmIs5dth8uF+K6nxIyKJXbcA4ASg7F1OJrHKFZdTc5v1cPeq6PcbqGgc+8SrPYQmzvQqLoMBuxyos2hUkYOmw3aeWJj9nFa8Wu5WaN89mUeOqSkU4S5cgUzWUOmKey56B/j/s1sVys9rMhZapVs0wL4L9GBBM48N5jAQZnnpo85A8KsZq5ME22bTLqnxsDXqDYZvS7PSI6Dxi7eleOFE/NYYDkrgDLHTQri8ucDMVeVWHgoMY2bPXdn7KKy5jW5jKsf8EPARXg77A4gRYmgKrcwIKqJEUPqyxJBe0CPoGTqgXPRsUiQ== tomk@hp2", * projectId: projectId, * }); * const testMetalDevice = new equinix.MetalDevice("testMetalDevice", { * hostname: "test", * plan: "c3.medium.x86", * facilities: ["ny5"], * operatingSystem: "ubuntu_20_04", * billingCycle: "hourly", * projectSshKeyIds: [testMetalProjectSSHKey.id], * projectId: projectId, * }); * ``` */ class MetalProjectSSHKey extends pulumi.CustomResource { constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["created"] = state ? state.created : undefined; resourceInputs["fingerprint"] = state ? state.fingerprint : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["ownerId"] = state ? state.ownerId : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["publicKey"] = state ? state.publicKey : undefined; resourceInputs["updated"] = state ? state.updated : undefined; } else { const args = argsOrState; if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.publicKey === undefined) && !opts.urn) { throw new Error("Missing required property 'publicKey'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["publicKey"] = args ? args.publicKey : undefined; resourceInputs["created"] = undefined /*out*/; resourceInputs["fingerprint"] = undefined /*out*/; resourceInputs["ownerId"] = undefined /*out*/; resourceInputs["updated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MetalProjectSSHKey.__pulumiType, name, resourceInputs, opts); } /** * Get an existing MetalProjectSSHKey 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, id, state, opts) { return new MetalProjectSSHKey(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MetalProjectSSHKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === MetalProjectSSHKey.__pulumiType; } } exports.MetalProjectSSHKey = MetalProjectSSHKey; /** @internal */ MetalProjectSSHKey.__pulumiType = 'equinix:index/metalProjectSSHKey:MetalProjectSSHKey'; //# sourceMappingURL=metalProjectSSHKey.js.map