UNPKG

@pulumi/vault

Version:

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

99 lines 4.21 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.SyncAzureDestination = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const az = new vault.secrets.SyncAzureDestination("az", { * name: "az-dest", * keyVaultUri: keyVaultUri, * clientId: clientId, * clientSecret: clientSecret, * tenantId: tenantId, * secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}", * customTags: { * foo: "bar", * }, * }); * ``` * * ## Import * * Azure Secrets sync destinations can be imported using the `name`, e.g. * * ```sh * $ pulumi import vault:secrets/syncAzureDestination:SyncAzureDestination az az-dest * ``` */ class SyncAzureDestination extends pulumi.CustomResource { /** * Get an existing SyncAzureDestination 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 SyncAzureDestination(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of SyncAzureDestination. 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'] === SyncAzureDestination.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientId"] = state?.clientId; resourceInputs["clientSecret"] = state?.clientSecret; resourceInputs["cloud"] = state?.cloud; resourceInputs["customTags"] = state?.customTags; resourceInputs["granularity"] = state?.granularity; resourceInputs["keyVaultUri"] = state?.keyVaultUri; resourceInputs["name"] = state?.name; resourceInputs["namespace"] = state?.namespace; resourceInputs["secretNameTemplate"] = state?.secretNameTemplate; resourceInputs["tenantId"] = state?.tenantId; resourceInputs["type"] = state?.type; } else { const args = argsOrState; resourceInputs["clientId"] = args?.clientId; resourceInputs["clientSecret"] = args?.clientSecret ? pulumi.secret(args.clientSecret) : undefined; resourceInputs["cloud"] = args?.cloud; resourceInputs["customTags"] = args?.customTags; resourceInputs["granularity"] = args?.granularity; resourceInputs["keyVaultUri"] = args?.keyVaultUri; resourceInputs["name"] = args?.name; resourceInputs["namespace"] = args?.namespace; resourceInputs["secretNameTemplate"] = args?.secretNameTemplate; resourceInputs["tenantId"] = args?.tenantId; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["clientSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SyncAzureDestination.__pulumiType, name, resourceInputs, opts); } } exports.SyncAzureDestination = SyncAzureDestination; /** @internal */ SyncAzureDestination.__pulumiType = 'vault:secrets/syncAzureDestination:SyncAzureDestination'; //# sourceMappingURL=syncAzureDestination.js.map