UNPKG

@pulumi/vault

Version:

A Pulumi package for creating and managing HashiCorp Vault cloud resources.

89 lines 3.86 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.SecretBackendCa = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage CA information in an SSH secret backend * [SSH secret backend within Vault](https://www.vaultproject.io/docs/secrets/ssh/index.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const example = new vault.Mount("example", {type: "ssh"}); * const foo = new vault.ssh.SecretBackendCa("foo", {backend: example.path}); * ``` * * ## Import * * SSH secret backend CAs can be imported using the `path`, e.g. * * ```sh * $ pulumi import vault:ssh/secretBackendCa:SecretBackendCa foo ssh * ``` */ class SecretBackendCa extends pulumi.CustomResource { /** * Get an existing SecretBackendCa 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 SecretBackendCa(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of SecretBackendCa. 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'] === SecretBackendCa.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["backend"] = state?.backend; resourceInputs["generateSigningKey"] = state?.generateSigningKey; resourceInputs["keyBits"] = state?.keyBits; resourceInputs["keyType"] = state?.keyType; resourceInputs["managedKeyId"] = state?.managedKeyId; resourceInputs["managedKeyName"] = state?.managedKeyName; resourceInputs["namespace"] = state?.namespace; resourceInputs["privateKey"] = state?.privateKey; resourceInputs["publicKey"] = state?.publicKey; } else { const args = argsOrState; resourceInputs["backend"] = args?.backend; resourceInputs["generateSigningKey"] = args?.generateSigningKey; resourceInputs["keyBits"] = args?.keyBits; resourceInputs["keyType"] = args?.keyType; resourceInputs["managedKeyId"] = args?.managedKeyId; resourceInputs["managedKeyName"] = args?.managedKeyName; resourceInputs["namespace"] = args?.namespace; resourceInputs["privateKey"] = args?.privateKey ? pulumi.secret(args.privateKey) : undefined; resourceInputs["publicKey"] = args?.publicKey; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["privateKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SecretBackendCa.__pulumiType, name, resourceInputs, opts); } } exports.SecretBackendCa = SecretBackendCa; /** @internal */ SecretBackendCa.__pulumiType = 'vault:ssh/secretBackendCa:SecretBackendCa'; //# sourceMappingURL=secretBackendCa.js.map