import * as pulumi from "@pulumi/pulumi"; /** * Writes a KV-V1 secret to a given path in Vault. * * For more information on Vault's KV-V1 secret backend * [see here](https://www.vaultproject.io/docs/secrets/kv/kv-v1). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vault from "@pulumi/vault"; * * const kvv1 = new vault.Mount("kvv1", { * path: "kvv1", * type: "kv", * options: { * version: "1", * }, * description: "KV Version 1 secret engine mount", * }); * const secret = new vault.kv.Secret("secret", { * path: pulumi.interpolate`${kvv1.path}/secret`, * dataJson: JSON.stringify({ * zip: "zap", * foo: "bar", * }), * }); * ``` * * ## Required Vault Capabilities * * Use of this resource requires the `create` or `update` capability * (depending on whether the resource already exists) on the given path, * the `delete` capability if the resource is removed from configuration, * and the `read` capability for drift detection (by default). * * ## Import * * KV-V1 secrets can be imported using the `path`, e.g. * * ```sh * $ pulumi import vault:kv/secret:Secret secret kvv1/secret * ``` */ export declare class Secret extends pulumi.CustomResource { /** * Get an existing Secret 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, state?: SecretState, opts?: pulumi.CustomResourceOptions): Secret; /** * Returns true if the given object is an instance of Secret. 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 Secret; /** * A mapping whose keys are the top-level data keys returned from * Vault and whose values are the corresponding values. This map can only * represent string data, so any non-string values returned from Vault are * serialized as JSON. */ readonly data: pulumi.Output<{ [key: string]: string; }>; /** * JSON-encoded string that will be * written as the secret data at the given path. */ readonly dataJson: pulumi.Output; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ readonly namespace: pulumi.Output; /** * Full path of the KV-V1 secret. */ readonly path: pulumi.Output; /** * Create a Secret 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: SecretArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Secret resources. */ export interface SecretState { /** * A mapping whose keys are the top-level data keys returned from * Vault and whose values are the corresponding values. This map can only * represent string data, so any non-string values returned from Vault are * serialized as JSON. */ data?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * JSON-encoded string that will be * written as the secret data at the given path. */ dataJson?: pulumi.Input; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * Full path of the KV-V1 secret. */ path?: pulumi.Input; } /** * The set of arguments for constructing a Secret resource. */ export interface SecretArgs { /** * JSON-encoded string that will be * written as the secret data at the given path. */ dataJson: pulumi.Input; /** * The namespace to provision the resource in. * The value should not contain leading or trailing forward slashes. * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace). * *Available only for Vault Enterprise*. */ namespace?: pulumi.Input; /** * Full path of the KV-V1 secret. */ path: pulumi.Input; }