Documentation
¶
Index ¶
- type GetSecretSubkeysV2Args
- type GetSecretSubkeysV2OutputArgs
- type GetSecretSubkeysV2Result
- type GetSecretSubkeysV2ResultOutput
- func (o GetSecretSubkeysV2ResultOutput) Data() pulumi.MapOutput
- func (o GetSecretSubkeysV2ResultOutput) DataJson() pulumi.StringOutput
- func (o GetSecretSubkeysV2ResultOutput) Depth() pulumi.IntPtrOutput
- func (GetSecretSubkeysV2ResultOutput) ElementType() reflect.Type
- func (o GetSecretSubkeysV2ResultOutput) Id() pulumi.StringOutput
- func (o GetSecretSubkeysV2ResultOutput) Mount() pulumi.StringOutput
- func (o GetSecretSubkeysV2ResultOutput) Name() pulumi.StringOutput
- func (o GetSecretSubkeysV2ResultOutput) Namespace() pulumi.StringPtrOutput
- func (o GetSecretSubkeysV2ResultOutput) Path() pulumi.StringOutput
- func (o GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutput() GetSecretSubkeysV2ResultOutput
- func (o GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutputWithContext(ctx context.Context) GetSecretSubkeysV2ResultOutput
- func (o GetSecretSubkeysV2ResultOutput) Version() pulumi.IntPtrOutput
- type GetSecretsListArgs
- type GetSecretsListOutputArgs
- type GetSecretsListResult
- type GetSecretsListResultOutput
- func (GetSecretsListResultOutput) ElementType() reflect.Type
- func (o GetSecretsListResultOutput) Id() pulumi.StringOutput
- func (o GetSecretsListResultOutput) Names() pulumi.StringArrayOutput
- func (o GetSecretsListResultOutput) Namespace() pulumi.StringPtrOutput
- func (o GetSecretsListResultOutput) Path() pulumi.StringOutput
- func (o GetSecretsListResultOutput) ToGetSecretsListResultOutput() GetSecretsListResultOutput
- func (o GetSecretsListResultOutput) ToGetSecretsListResultOutputWithContext(ctx context.Context) GetSecretsListResultOutput
- type GetSecretsListV2Args
- type GetSecretsListV2OutputArgs
- type GetSecretsListV2Result
- type GetSecretsListV2ResultOutput
- func (GetSecretsListV2ResultOutput) ElementType() reflect.Type
- func (o GetSecretsListV2ResultOutput) Id() pulumi.StringOutput
- func (o GetSecretsListV2ResultOutput) Mount() pulumi.StringOutput
- func (o GetSecretsListV2ResultOutput) Name() pulumi.StringPtrOutput
- func (o GetSecretsListV2ResultOutput) Names() pulumi.StringArrayOutput
- func (o GetSecretsListV2ResultOutput) Namespace() pulumi.StringPtrOutput
- func (o GetSecretsListV2ResultOutput) Path() pulumi.StringOutput
- func (o GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutput() GetSecretsListV2ResultOutput
- func (o GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutputWithContext(ctx context.Context) GetSecretsListV2ResultOutput
- type LookupSecretArgs
- type LookupSecretOutputArgs
- type LookupSecretResult
- type LookupSecretResultOutput
- func (o LookupSecretResultOutput) Data() pulumi.MapOutput
- func (o LookupSecretResultOutput) DataJson() pulumi.StringOutput
- func (LookupSecretResultOutput) ElementType() reflect.Type
- func (o LookupSecretResultOutput) Id() pulumi.StringOutput
- func (o LookupSecretResultOutput) LeaseDuration() pulumi.IntOutput
- func (o LookupSecretResultOutput) LeaseId() pulumi.StringOutput
- func (o LookupSecretResultOutput) LeaseRenewable() pulumi.BoolOutput
- func (o LookupSecretResultOutput) Namespace() pulumi.StringPtrOutput
- func (o LookupSecretResultOutput) Path() pulumi.StringOutput
- func (o LookupSecretResultOutput) ToLookupSecretResultOutput() LookupSecretResultOutput
- func (o LookupSecretResultOutput) ToLookupSecretResultOutputWithContext(ctx context.Context) LookupSecretResultOutput
- type LookupSecretV2Args
- type LookupSecretV2OutputArgs
- type LookupSecretV2Result
- type LookupSecretV2ResultOutput
- func (o LookupSecretV2ResultOutput) CreatedTime() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) CustomMetadata() pulumi.MapOutput
- func (o LookupSecretV2ResultOutput) Data() pulumi.MapOutput
- func (o LookupSecretV2ResultOutput) DataJson() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) DeletionTime() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) Destroyed() pulumi.BoolOutput
- func (LookupSecretV2ResultOutput) ElementType() reflect.Type
- func (o LookupSecretV2ResultOutput) Id() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) Mount() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) Name() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) Namespace() pulumi.StringPtrOutput
- func (o LookupSecretV2ResultOutput) Path() pulumi.StringOutput
- func (o LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutput() LookupSecretV2ResultOutput
- func (o LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutputWithContext(ctx context.Context) LookupSecretV2ResultOutput
- func (o LookupSecretV2ResultOutput) Version() pulumi.IntPtrOutput
- type Secret
- type SecretArgs
- type SecretArray
- type SecretArrayInput
- type SecretArrayOutput
- type SecretBackendV2
- type SecretBackendV2Args
- type SecretBackendV2Array
- type SecretBackendV2ArrayInput
- type SecretBackendV2ArrayOutput
- func (SecretBackendV2ArrayOutput) ElementType() reflect.Type
- func (o SecretBackendV2ArrayOutput) Index(i pulumi.IntInput) SecretBackendV2Output
- func (o SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutput() SecretBackendV2ArrayOutput
- func (o SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutputWithContext(ctx context.Context) SecretBackendV2ArrayOutput
- type SecretBackendV2Input
- type SecretBackendV2Map
- type SecretBackendV2MapInput
- type SecretBackendV2MapOutput
- func (SecretBackendV2MapOutput) ElementType() reflect.Type
- func (o SecretBackendV2MapOutput) MapIndex(k pulumi.StringInput) SecretBackendV2Output
- func (o SecretBackendV2MapOutput) ToSecretBackendV2MapOutput() SecretBackendV2MapOutput
- func (o SecretBackendV2MapOutput) ToSecretBackendV2MapOutputWithContext(ctx context.Context) SecretBackendV2MapOutput
- type SecretBackendV2Output
- func (o SecretBackendV2Output) CasRequired() pulumi.BoolOutput
- func (o SecretBackendV2Output) DeleteVersionAfter() pulumi.IntPtrOutput
- func (SecretBackendV2Output) ElementType() reflect.Type
- func (o SecretBackendV2Output) MaxVersions() pulumi.IntOutput
- func (o SecretBackendV2Output) Mount() pulumi.StringOutput
- func (o SecretBackendV2Output) Namespace() pulumi.StringPtrOutput
- func (o SecretBackendV2Output) ToSecretBackendV2Output() SecretBackendV2Output
- func (o SecretBackendV2Output) ToSecretBackendV2OutputWithContext(ctx context.Context) SecretBackendV2Output
- type SecretBackendV2State
- type SecretInput
- type SecretMap
- type SecretMapInput
- type SecretMapOutput
- type SecretOutput
- func (o SecretOutput) Data() pulumi.MapOutput
- func (o SecretOutput) DataJson() pulumi.StringOutput
- func (SecretOutput) ElementType() reflect.Type
- func (o SecretOutput) Namespace() pulumi.StringPtrOutput
- func (o SecretOutput) Path() pulumi.StringOutput
- func (o SecretOutput) ToSecretOutput() SecretOutput
- func (o SecretOutput) ToSecretOutputWithContext(ctx context.Context) SecretOutput
- type SecretState
- type SecretV2
- type SecretV2Args
- type SecretV2Array
- type SecretV2ArrayInput
- type SecretV2ArrayOutput
- type SecretV2CustomMetadata
- type SecretV2CustomMetadataArgs
- func (SecretV2CustomMetadataArgs) ElementType() reflect.Type
- func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutput() SecretV2CustomMetadataOutput
- func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutputWithContext(ctx context.Context) SecretV2CustomMetadataOutput
- func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
- func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
- type SecretV2CustomMetadataInput
- type SecretV2CustomMetadataOutput
- func (o SecretV2CustomMetadataOutput) CasRequired() pulumi.BoolPtrOutput
- func (o SecretV2CustomMetadataOutput) Data() pulumi.MapOutput
- func (o SecretV2CustomMetadataOutput) DeleteVersionAfter() pulumi.IntPtrOutput
- func (SecretV2CustomMetadataOutput) ElementType() reflect.Type
- func (o SecretV2CustomMetadataOutput) MaxVersions() pulumi.IntPtrOutput
- func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutput() SecretV2CustomMetadataOutput
- func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutputWithContext(ctx context.Context) SecretV2CustomMetadataOutput
- func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
- func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
- type SecretV2CustomMetadataPtrInput
- type SecretV2CustomMetadataPtrOutput
- func (o SecretV2CustomMetadataPtrOutput) CasRequired() pulumi.BoolPtrOutput
- func (o SecretV2CustomMetadataPtrOutput) Data() pulumi.MapOutput
- func (o SecretV2CustomMetadataPtrOutput) DeleteVersionAfter() pulumi.IntPtrOutput
- func (o SecretV2CustomMetadataPtrOutput) Elem() SecretV2CustomMetadataOutput
- func (SecretV2CustomMetadataPtrOutput) ElementType() reflect.Type
- func (o SecretV2CustomMetadataPtrOutput) MaxVersions() pulumi.IntPtrOutput
- func (o SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
- func (o SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
- type SecretV2Input
- type SecretV2Map
- type SecretV2MapInput
- type SecretV2MapOutput
- type SecretV2Output
- func (o SecretV2Output) Cas() pulumi.IntPtrOutput
- func (o SecretV2Output) CustomMetadata() SecretV2CustomMetadataOutput
- func (o SecretV2Output) Data() pulumi.MapOutput
- func (o SecretV2Output) DataJson() pulumi.StringOutput
- func (o SecretV2Output) DeleteAllVersions() pulumi.BoolPtrOutput
- func (o SecretV2Output) DisableRead() pulumi.BoolPtrOutput
- func (SecretV2Output) ElementType() reflect.Type
- func (o SecretV2Output) Metadata() pulumi.MapOutput
- func (o SecretV2Output) Mount() pulumi.StringOutput
- func (o SecretV2Output) Name() pulumi.StringOutput
- func (o SecretV2Output) Namespace() pulumi.StringPtrOutput
- func (o SecretV2Output) Options() pulumi.MapOutput
- func (o SecretV2Output) Path() pulumi.StringOutput
- func (o SecretV2Output) ToSecretV2Output() SecretV2Output
- func (o SecretV2Output) ToSecretV2OutputWithContext(ctx context.Context) SecretV2Output
- type SecretV2State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSecretSubkeysV2Args ¶
type GetSecretSubkeysV2Args struct { // Specifies the deepest nesting level to provide in the output. // If non-zero, keys that reside at the specified depth value will be // artificially treated as leaves and will thus be `null` even if further // underlying sub-keys exist. Depth *int `pulumi:"depth"` // Path where KV-V2 engine is mounted. Mount string `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name string `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace *string `pulumi:"namespace"` // Specifies the version to return. If not // set the latest version is returned. Version *int `pulumi:"version"` }
A collection of arguments for invoking getSecretSubkeysV2.
type GetSecretSubkeysV2OutputArgs ¶
type GetSecretSubkeysV2OutputArgs struct { // Specifies the deepest nesting level to provide in the output. // If non-zero, keys that reside at the specified depth value will be // artificially treated as leaves and will thus be `null` even if further // underlying sub-keys exist. Depth pulumi.IntPtrInput `pulumi:"depth"` // Path where KV-V2 engine is mounted. Mount pulumi.StringInput `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringInput `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput `pulumi:"namespace"` // Specifies the version to return. If not // set the latest version is returned. Version pulumi.IntPtrInput `pulumi:"version"` }
A collection of arguments for invoking getSecretSubkeysV2.
func (GetSecretSubkeysV2OutputArgs) ElementType ¶
func (GetSecretSubkeysV2OutputArgs) ElementType() reflect.Type
type GetSecretSubkeysV2Result ¶
type GetSecretSubkeysV2Result struct { // Subkeys for the KV-V2 secret stored as a serialized map of strings. Data map[string]interface{} `pulumi:"data"` // Subkeys for the KV-V2 secret read from Vault. DataJson string `pulumi:"dataJson"` Depth *int `pulumi:"depth"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Mount string `pulumi:"mount"` Name string `pulumi:"name"` Namespace *string `pulumi:"namespace"` // Full path where the KV-V2 secrets are listed. Path string `pulumi:"path"` Version *int `pulumi:"version"` }
A collection of values returned by getSecretSubkeysV2.
func GetSecretSubkeysV2 ¶
func GetSecretSubkeysV2(ctx *pulumi.Context, args *GetSecretSubkeysV2Args, opts ...pulumi.InvokeOption) (*GetSecretSubkeysV2Result, error)
## Example Usage
```go package main
import (
"encoding/json" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv2, err := vault.NewMount(ctx, "kvv2", &vault.MountArgs{ Path: pulumi.String("kvv2"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("2"), }, Description: pulumi.String("KV Version 2 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", "foo": "bar", }) if err != nil { return err } json0 := string(tmpJSON0) awsSecret, err := kv.NewSecretV2(ctx, "awsSecret", &kv.SecretV2Args{ Mount: kvv2.Path, DataJson: pulumi.String(json0), }) if err != nil { return err } _ = kv.GetSecretSubkeysV2Output(ctx, kv.GetSecretSubkeysV2OutputArgs{ Mount: kvv2.Path, Name: awsSecret.Name, }, nil) return nil }) }
``` ## Required Vault Capabilities
Use of this resource requires the `read` capability on the given path.
type GetSecretSubkeysV2ResultOutput ¶
type GetSecretSubkeysV2ResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSecretSubkeysV2.
func GetSecretSubkeysV2Output ¶
func GetSecretSubkeysV2Output(ctx *pulumi.Context, args GetSecretSubkeysV2OutputArgs, opts ...pulumi.InvokeOption) GetSecretSubkeysV2ResultOutput
func (GetSecretSubkeysV2ResultOutput) Data ¶
func (o GetSecretSubkeysV2ResultOutput) Data() pulumi.MapOutput
Subkeys for the KV-V2 secret stored as a serialized map of strings.
func (GetSecretSubkeysV2ResultOutput) DataJson ¶
func (o GetSecretSubkeysV2ResultOutput) DataJson() pulumi.StringOutput
Subkeys for the KV-V2 secret read from Vault.
func (GetSecretSubkeysV2ResultOutput) Depth ¶
func (o GetSecretSubkeysV2ResultOutput) Depth() pulumi.IntPtrOutput
func (GetSecretSubkeysV2ResultOutput) ElementType ¶
func (GetSecretSubkeysV2ResultOutput) ElementType() reflect.Type
func (GetSecretSubkeysV2ResultOutput) Id ¶
func (o GetSecretSubkeysV2ResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetSecretSubkeysV2ResultOutput) Mount ¶
func (o GetSecretSubkeysV2ResultOutput) Mount() pulumi.StringOutput
func (GetSecretSubkeysV2ResultOutput) Name ¶
func (o GetSecretSubkeysV2ResultOutput) Name() pulumi.StringOutput
func (GetSecretSubkeysV2ResultOutput) Namespace ¶
func (o GetSecretSubkeysV2ResultOutput) Namespace() pulumi.StringPtrOutput
func (GetSecretSubkeysV2ResultOutput) Path ¶
func (o GetSecretSubkeysV2ResultOutput) Path() pulumi.StringOutput
Full path where the KV-V2 secrets are listed.
func (GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutput ¶
func (o GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutput() GetSecretSubkeysV2ResultOutput
func (GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutputWithContext ¶
func (o GetSecretSubkeysV2ResultOutput) ToGetSecretSubkeysV2ResultOutputWithContext(ctx context.Context) GetSecretSubkeysV2ResultOutput
func (GetSecretSubkeysV2ResultOutput) Version ¶
func (o GetSecretSubkeysV2ResultOutput) Version() pulumi.IntPtrOutput
type GetSecretsListArgs ¶
type GetSecretsListArgs struct { // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace *string `pulumi:"namespace"` // Full KV-V1 path where secrets will be listed. Path string `pulumi:"path"` }
A collection of arguments for invoking getSecretsList.
type GetSecretsListOutputArgs ¶
type GetSecretsListOutputArgs struct { // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput `pulumi:"namespace"` // Full KV-V1 path where secrets will be listed. Path pulumi.StringInput `pulumi:"path"` }
A collection of arguments for invoking getSecretsList.
func (GetSecretsListOutputArgs) ElementType ¶
func (GetSecretsListOutputArgs) ElementType() reflect.Type
type GetSecretsListResult ¶
type GetSecretsListResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // List of all secret names listed under the given path. Names []string `pulumi:"names"` Namespace *string `pulumi:"namespace"` Path string `pulumi:"path"` }
A collection of values returned by getSecretsList.
func GetSecretsList ¶
func GetSecretsList(ctx *pulumi.Context, args *GetSecretsListArgs, opts ...pulumi.InvokeOption) (*GetSecretsListResult, error)
## Example Usage
```go package main
import (
"encoding/json" "fmt" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv1, err := vault.NewMount(ctx, "kvv1", &vault.MountArgs{ Path: pulumi.String("kvv1"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("1"), }, Description: pulumi.String("KV Version 1 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", }) if err != nil { return err } json0 := string(tmpJSON0) _, err = kv.NewSecret(ctx, "awsSecret", &kv.SecretArgs{ Path: kvv1.Path.ApplyT(func(path string) (string, error) { return fmt.Sprintf("%v/aws-secret", path), nil }).(pulumi.StringOutput), DataJson: pulumi.String(json0), }) if err != nil { return err } tmpJSON1, err := json.Marshal(map[string]interface{}{ "foo": "bar", }) if err != nil { return err } json1 := string(tmpJSON1) _, err = kv.NewSecret(ctx, "azureSecret", &kv.SecretArgs{ Path: kvv1.Path.ApplyT(func(path string) (string, error) { return fmt.Sprintf("%v/azure-secret", path), nil }).(pulumi.StringOutput), DataJson: pulumi.String(json1), }) if err != nil { return err } _ = kv.GetSecretsListOutput(ctx, kv.GetSecretsListOutputArgs{ Path: kvv1.Path, }, nil) return nil }) }
``` ## Required Vault Capabilities
Use of this resource requires the `read` capability on the given path.
type GetSecretsListResultOutput ¶
type GetSecretsListResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSecretsList.
func GetSecretsListOutput ¶
func GetSecretsListOutput(ctx *pulumi.Context, args GetSecretsListOutputArgs, opts ...pulumi.InvokeOption) GetSecretsListResultOutput
func (GetSecretsListResultOutput) ElementType ¶
func (GetSecretsListResultOutput) ElementType() reflect.Type
func (GetSecretsListResultOutput) Id ¶
func (o GetSecretsListResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetSecretsListResultOutput) Names ¶
func (o GetSecretsListResultOutput) Names() pulumi.StringArrayOutput
List of all secret names listed under the given path.
func (GetSecretsListResultOutput) Namespace ¶
func (o GetSecretsListResultOutput) Namespace() pulumi.StringPtrOutput
func (GetSecretsListResultOutput) Path ¶
func (o GetSecretsListResultOutput) Path() pulumi.StringOutput
func (GetSecretsListResultOutput) ToGetSecretsListResultOutput ¶
func (o GetSecretsListResultOutput) ToGetSecretsListResultOutput() GetSecretsListResultOutput
func (GetSecretsListResultOutput) ToGetSecretsListResultOutputWithContext ¶
func (o GetSecretsListResultOutput) ToGetSecretsListResultOutputWithContext(ctx context.Context) GetSecretsListResultOutput
type GetSecretsListV2Args ¶
type GetSecretsListV2Args struct { // Path where KV-V2 engine is mounted. Mount string `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name *string `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace *string `pulumi:"namespace"` }
A collection of arguments for invoking getSecretsListV2.
type GetSecretsListV2OutputArgs ¶
type GetSecretsListV2OutputArgs struct { // Path where KV-V2 engine is mounted. Mount pulumi.StringInput `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringPtrInput `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput `pulumi:"namespace"` }
A collection of arguments for invoking getSecretsListV2.
func (GetSecretsListV2OutputArgs) ElementType ¶
func (GetSecretsListV2OutputArgs) ElementType() reflect.Type
type GetSecretsListV2Result ¶
type GetSecretsListV2Result struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Mount string `pulumi:"mount"` Name *string `pulumi:"name"` // List of all secret names listed under the given path. Names []string `pulumi:"names"` Namespace *string `pulumi:"namespace"` // Full path where the KV-V2 secrets are listed. Path string `pulumi:"path"` }
A collection of values returned by getSecretsListV2.
func GetSecretsListV2 ¶
func GetSecretsListV2(ctx *pulumi.Context, args *GetSecretsListV2Args, opts ...pulumi.InvokeOption) (*GetSecretsListV2Result, error)
## Example Usage
```go package main
import (
"encoding/json" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv2, err := vault.NewMount(ctx, "kvv2", &vault.MountArgs{ Path: pulumi.String("kvv2"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("2"), }, Description: pulumi.String("KV Version 2 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", }) if err != nil { return err } json0 := string(tmpJSON0) _, err = kv.NewSecretV2(ctx, "awsSecret", &kv.SecretV2Args{ Mount: kvv2.Path, DataJson: pulumi.String(json0), }) if err != nil { return err } tmpJSON1, err := json.Marshal(map[string]interface{}{ "foo": "bar", }) if err != nil { return err } json1 := string(tmpJSON1) _, err = kv.NewSecretV2(ctx, "azureSecret", &kv.SecretV2Args{ Mount: kvv2.Path, DataJson: pulumi.String(json1), }) if err != nil { return err } tmpJSON2, err := json.Marshal(map[string]interface{}{ "password": "test", }) if err != nil { return err } json2 := string(tmpJSON2) _, err = kv.NewSecretV2(ctx, "nestedSecret", &kv.SecretV2Args{ Mount: kvv2.Path, DataJson: pulumi.String(json2), }) if err != nil { return err } _ = kv.GetSecretsListV2Output(ctx, kv.GetSecretsListV2OutputArgs{ Mount: kvv2.Path, }, nil) _ = kvv2.Path.ApplyT(func(path string) (kv.GetSecretsListV2Result, error) { return kv.GetSecretsListV2Output(ctx, kv.GetSecretsListV2OutputArgs{ Mount: path, Name: vault_kv_secret_v2.Test_2.Name, }, nil), nil }).(kv.GetSecretsListV2ResultOutput) return nil }) }
``` ## Required Vault Capabilities
Use of this resource requires the `read` capability on the given path.
type GetSecretsListV2ResultOutput ¶
type GetSecretsListV2ResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSecretsListV2.
func GetSecretsListV2Output ¶
func GetSecretsListV2Output(ctx *pulumi.Context, args GetSecretsListV2OutputArgs, opts ...pulumi.InvokeOption) GetSecretsListV2ResultOutput
func (GetSecretsListV2ResultOutput) ElementType ¶
func (GetSecretsListV2ResultOutput) ElementType() reflect.Type
func (GetSecretsListV2ResultOutput) Id ¶
func (o GetSecretsListV2ResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (GetSecretsListV2ResultOutput) Mount ¶
func (o GetSecretsListV2ResultOutput) Mount() pulumi.StringOutput
func (GetSecretsListV2ResultOutput) Name ¶
func (o GetSecretsListV2ResultOutput) Name() pulumi.StringPtrOutput
func (GetSecretsListV2ResultOutput) Names ¶
func (o GetSecretsListV2ResultOutput) Names() pulumi.StringArrayOutput
List of all secret names listed under the given path.
func (GetSecretsListV2ResultOutput) Namespace ¶
func (o GetSecretsListV2ResultOutput) Namespace() pulumi.StringPtrOutput
func (GetSecretsListV2ResultOutput) Path ¶
func (o GetSecretsListV2ResultOutput) Path() pulumi.StringOutput
Full path where the KV-V2 secrets are listed.
func (GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutput ¶
func (o GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutput() GetSecretsListV2ResultOutput
func (GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutputWithContext ¶
func (o GetSecretsListV2ResultOutput) ToGetSecretsListV2ResultOutputWithContext(ctx context.Context) GetSecretsListV2ResultOutput
type LookupSecretArgs ¶
type LookupSecretArgs struct { // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace *string `pulumi:"namespace"` // Full path of the KV-V1 secret. Path string `pulumi:"path"` }
A collection of arguments for invoking getSecret.
type LookupSecretOutputArgs ¶
type LookupSecretOutputArgs struct { // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput `pulumi:"namespace"` // Full path of the KV-V1 secret. Path pulumi.StringInput `pulumi:"path"` }
A collection of arguments for invoking getSecret.
func (LookupSecretOutputArgs) ElementType ¶
func (LookupSecretOutputArgs) ElementType() reflect.Type
type LookupSecretResult ¶
type LookupSecretResult struct { // 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 map[string]interface{} `pulumi:"data"` // JSON-encoded string that that is // read as the secret data at the given path. DataJson string `pulumi:"dataJson"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The duration of the secret lease, in seconds. Once // this time has passed any plan generated with this data may fail to apply. LeaseDuration int `pulumi:"leaseDuration"` // The lease identifier assigned by Vault, if any. LeaseId string `pulumi:"leaseId"` // True if the duration of this lease can be extended // through renewal. LeaseRenewable bool `pulumi:"leaseRenewable"` Namespace *string `pulumi:"namespace"` Path string `pulumi:"path"` }
A collection of values returned by getSecret.
func LookupSecret ¶
func LookupSecret(ctx *pulumi.Context, args *LookupSecretArgs, opts ...pulumi.InvokeOption) (*LookupSecretResult, error)
## Example Usage
```go package main
import (
"encoding/json" "fmt" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv1, err := vault.NewMount(ctx, "kvv1", &vault.MountArgs{ Path: pulumi.String("kvv1"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("1"), }, Description: pulumi.String("KV Version 1 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", "foo": "bar", }) if err != nil { return err } json0 := string(tmpJSON0) secret, err := kv.NewSecret(ctx, "secret", &kv.SecretArgs{ Path: kvv1.Path.ApplyT(func(path string) (string, error) { return fmt.Sprintf("%v/secret", path), nil }).(pulumi.StringOutput), DataJson: pulumi.String(json0), }) if err != nil { return err } _ = kv.LookupSecretOutput(ctx, kv.GetSecretOutputArgs{ Path: secret.Path, }, nil) return nil }) }
``` ## Required Vault Capabilities
Use of this resource requires the `read` capability on the given path.
type LookupSecretResultOutput ¶
type LookupSecretResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSecret.
func LookupSecretOutput ¶
func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput
func (LookupSecretResultOutput) Data ¶
func (o LookupSecretResultOutput) Data() pulumi.MapOutput
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.
func (LookupSecretResultOutput) DataJson ¶
func (o LookupSecretResultOutput) DataJson() pulumi.StringOutput
JSON-encoded string that that is read as the secret data at the given path.
func (LookupSecretResultOutput) ElementType ¶
func (LookupSecretResultOutput) ElementType() reflect.Type
func (LookupSecretResultOutput) Id ¶
func (o LookupSecretResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (LookupSecretResultOutput) LeaseDuration ¶
func (o LookupSecretResultOutput) LeaseDuration() pulumi.IntOutput
The duration of the secret lease, in seconds. Once this time has passed any plan generated with this data may fail to apply.
func (LookupSecretResultOutput) LeaseId ¶
func (o LookupSecretResultOutput) LeaseId() pulumi.StringOutput
The lease identifier assigned by Vault, if any.
func (LookupSecretResultOutput) LeaseRenewable ¶
func (o LookupSecretResultOutput) LeaseRenewable() pulumi.BoolOutput
True if the duration of this lease can be extended through renewal.
func (LookupSecretResultOutput) Namespace ¶
func (o LookupSecretResultOutput) Namespace() pulumi.StringPtrOutput
func (LookupSecretResultOutput) Path ¶
func (o LookupSecretResultOutput) Path() pulumi.StringOutput
func (LookupSecretResultOutput) ToLookupSecretResultOutput ¶
func (o LookupSecretResultOutput) ToLookupSecretResultOutput() LookupSecretResultOutput
func (LookupSecretResultOutput) ToLookupSecretResultOutputWithContext ¶
func (o LookupSecretResultOutput) ToLookupSecretResultOutputWithContext(ctx context.Context) LookupSecretResultOutput
type LookupSecretV2Args ¶
type LookupSecretV2Args struct { // Path where KV-V2 engine is mounted. Mount string `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name string `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace *string `pulumi:"namespace"` // Version of the secret to retrieve. Version *int `pulumi:"version"` }
A collection of arguments for invoking getSecretV2.
type LookupSecretV2OutputArgs ¶
type LookupSecretV2OutputArgs struct { // Path where KV-V2 engine is mounted. Mount pulumi.StringInput `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringInput `pulumi:"name"` // The namespace of the target resource. // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput `pulumi:"namespace"` // Version of the secret to retrieve. Version pulumi.IntPtrInput `pulumi:"version"` }
A collection of arguments for invoking getSecretV2.
func (LookupSecretV2OutputArgs) ElementType ¶
func (LookupSecretV2OutputArgs) ElementType() reflect.Type
type LookupSecretV2Result ¶
type LookupSecretV2Result struct { // Time at which secret was created. CreatedTime string `pulumi:"createdTime"` // Custom metadata for the secret. CustomMetadata map[string]interface{} `pulumi:"customMetadata"` // 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 map[string]interface{} `pulumi:"data"` // JSON-encoded string that that is // read as the secret data at the given path. DataJson string `pulumi:"dataJson"` // Deletion time for the secret. DeletionTime string `pulumi:"deletionTime"` // Indicates whether the secret has been destroyed. Destroyed bool `pulumi:"destroyed"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Mount string `pulumi:"mount"` Name string `pulumi:"name"` Namespace *string `pulumi:"namespace"` // Full path where the KVV2 secret is written. Path string `pulumi:"path"` Version *int `pulumi:"version"` }
A collection of values returned by getSecretV2.
func LookupSecretV2 ¶
func LookupSecretV2(ctx *pulumi.Context, args *LookupSecretV2Args, opts ...pulumi.InvokeOption) (*LookupSecretV2Result, error)
## Required Vault Capabilities
Use of this resource requires the `read` capability on the given path.
type LookupSecretV2ResultOutput ¶
type LookupSecretV2ResultOutput struct{ *pulumi.OutputState }
A collection of values returned by getSecretV2.
func LookupSecretV2Output ¶
func LookupSecretV2Output(ctx *pulumi.Context, args LookupSecretV2OutputArgs, opts ...pulumi.InvokeOption) LookupSecretV2ResultOutput
func (LookupSecretV2ResultOutput) CreatedTime ¶
func (o LookupSecretV2ResultOutput) CreatedTime() pulumi.StringOutput
Time at which secret was created.
func (LookupSecretV2ResultOutput) CustomMetadata ¶
func (o LookupSecretV2ResultOutput) CustomMetadata() pulumi.MapOutput
Custom metadata for the secret.
func (LookupSecretV2ResultOutput) Data ¶
func (o LookupSecretV2ResultOutput) Data() pulumi.MapOutput
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.
func (LookupSecretV2ResultOutput) DataJson ¶
func (o LookupSecretV2ResultOutput) DataJson() pulumi.StringOutput
JSON-encoded string that that is read as the secret data at the given path.
func (LookupSecretV2ResultOutput) DeletionTime ¶
func (o LookupSecretV2ResultOutput) DeletionTime() pulumi.StringOutput
Deletion time for the secret.
func (LookupSecretV2ResultOutput) Destroyed ¶
func (o LookupSecretV2ResultOutput) Destroyed() pulumi.BoolOutput
Indicates whether the secret has been destroyed.
func (LookupSecretV2ResultOutput) ElementType ¶
func (LookupSecretV2ResultOutput) ElementType() reflect.Type
func (LookupSecretV2ResultOutput) Id ¶
func (o LookupSecretV2ResultOutput) Id() pulumi.StringOutput
The provider-assigned unique ID for this managed resource.
func (LookupSecretV2ResultOutput) Mount ¶
func (o LookupSecretV2ResultOutput) Mount() pulumi.StringOutput
func (LookupSecretV2ResultOutput) Name ¶
func (o LookupSecretV2ResultOutput) Name() pulumi.StringOutput
func (LookupSecretV2ResultOutput) Namespace ¶
func (o LookupSecretV2ResultOutput) Namespace() pulumi.StringPtrOutput
func (LookupSecretV2ResultOutput) Path ¶
func (o LookupSecretV2ResultOutput) Path() pulumi.StringOutput
Full path where the KVV2 secret is written.
func (LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutput ¶
func (o LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutput() LookupSecretV2ResultOutput
func (LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutputWithContext ¶
func (o LookupSecretV2ResultOutput) ToLookupSecretV2ResultOutputWithContext(ctx context.Context) LookupSecretV2ResultOutput
func (LookupSecretV2ResultOutput) Version ¶
func (o LookupSecretV2ResultOutput) Version() pulumi.IntPtrOutput
type Secret ¶
type Secret struct { pulumi.CustomResourceState // 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.MapOutput `pulumi:"data"` // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringOutput `pulumi:"dataJson"` // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrOutput `pulumi:"namespace"` // Full path of the KV-V1 secret. Path pulumi.StringOutput `pulumi:"path"` }
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
```go package main
import (
"encoding/json" "fmt" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv1, err := vault.NewMount(ctx, "kvv1", &vault.MountArgs{ Path: pulumi.String("kvv1"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("1"), }, Description: pulumi.String("KV Version 1 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", "foo": "bar", }) if err != nil { return err } json0 := string(tmpJSON0) _, err = kv.NewSecret(ctx, "secret", &kv.SecretArgs{ Path: kvv1.Path.ApplyT(func(path string) (string, error) { return fmt.Sprintf("%v/secret", path), nil }).(pulumi.StringOutput), DataJson: pulumi.String(json0), }) if err != nil { return err } return nil }) }
``` ## 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
```
func GetSecret ¶
func GetSecret(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SecretState, opts ...pulumi.ResourceOption) (*Secret, error)
GetSecret gets an existing Secret resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSecret ¶
func NewSecret(ctx *pulumi.Context, name string, args *SecretArgs, opts ...pulumi.ResourceOption) (*Secret, error)
NewSecret registers a new resource with the given unique name, arguments, and options.
func (*Secret) ElementType ¶
func (*Secret) ToSecretOutput ¶
func (i *Secret) ToSecretOutput() SecretOutput
func (*Secret) ToSecretOutputWithContext ¶
func (i *Secret) ToSecretOutputWithContext(ctx context.Context) SecretOutput
type SecretArgs ¶
type SecretArgs struct { // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput // Full path of the KV-V1 secret. Path pulumi.StringInput }
The set of arguments for constructing a Secret resource.
func (SecretArgs) ElementType ¶
func (SecretArgs) ElementType() reflect.Type
type SecretArray ¶
type SecretArray []SecretInput
func (SecretArray) ElementType ¶
func (SecretArray) ElementType() reflect.Type
func (SecretArray) ToSecretArrayOutput ¶
func (i SecretArray) ToSecretArrayOutput() SecretArrayOutput
func (SecretArray) ToSecretArrayOutputWithContext ¶
func (i SecretArray) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput
type SecretArrayInput ¶
type SecretArrayInput interface { pulumi.Input ToSecretArrayOutput() SecretArrayOutput ToSecretArrayOutputWithContext(context.Context) SecretArrayOutput }
SecretArrayInput is an input type that accepts SecretArray and SecretArrayOutput values. You can construct a concrete instance of `SecretArrayInput` via:
SecretArray{ SecretArgs{...} }
type SecretArrayOutput ¶
type SecretArrayOutput struct{ *pulumi.OutputState }
func (SecretArrayOutput) ElementType ¶
func (SecretArrayOutput) ElementType() reflect.Type
func (SecretArrayOutput) Index ¶
func (o SecretArrayOutput) Index(i pulumi.IntInput) SecretOutput
func (SecretArrayOutput) ToSecretArrayOutput ¶
func (o SecretArrayOutput) ToSecretArrayOutput() SecretArrayOutput
func (SecretArrayOutput) ToSecretArrayOutputWithContext ¶
func (o SecretArrayOutput) ToSecretArrayOutputWithContext(ctx context.Context) SecretArrayOutput
type SecretBackendV2 ¶
type SecretBackendV2 struct { pulumi.CustomResourceState // If true, all keys will require the cas // parameter to be set on all write requests. CasRequired pulumi.BoolOutput `pulumi:"casRequired"` // If set, specifies the length of time before // a version is deleted. Accepts duration in integer seconds. DeleteVersionAfter pulumi.IntPtrOutput `pulumi:"deleteVersionAfter"` // The number of versions to keep per key. MaxVersions pulumi.IntOutput `pulumi:"maxVersions"` // Path where KV-V2 engine is mounted. Mount pulumi.StringOutput `pulumi:"mount"` // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrOutput `pulumi:"namespace"` }
Configures KV-V2 backend level settings that are applied to every key in the key-value store.
For more information on Vault's KV-V2 secret backend [see here](https://www.vaultproject.io/docs/secrets/kv/kv-v2).
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv2, err := vault.NewMount(ctx, "kvv2", &vault.MountArgs{ Path: pulumi.String("kvv2"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("2"), }, Description: pulumi.String("KV Version 2 secret engine mount"), }) if err != nil { return err } _, err = kv.NewSecretBackendV2(ctx, "example", &kv.SecretBackendV2Args{ Mount: kvv2.Path, MaxVersions: pulumi.Int(5), DeleteVersionAfter: pulumi.Int(12600), CasRequired: pulumi.Bool(true), }) if err != nil { return err } return nil }) }
``` ## 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
The KV-V2 secret backend can be imported using its unique ID, the `${mount}/config`, e.g.
```sh
$ pulumi import vault:kv/secretBackendV2:SecretBackendV2 example kvv2/config
```
func GetSecretBackendV2 ¶
func GetSecretBackendV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SecretBackendV2State, opts ...pulumi.ResourceOption) (*SecretBackendV2, error)
GetSecretBackendV2 gets an existing SecretBackendV2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSecretBackendV2 ¶
func NewSecretBackendV2(ctx *pulumi.Context, name string, args *SecretBackendV2Args, opts ...pulumi.ResourceOption) (*SecretBackendV2, error)
NewSecretBackendV2 registers a new resource with the given unique name, arguments, and options.
func (*SecretBackendV2) ElementType ¶
func (*SecretBackendV2) ElementType() reflect.Type
func (*SecretBackendV2) ToSecretBackendV2Output ¶
func (i *SecretBackendV2) ToSecretBackendV2Output() SecretBackendV2Output
func (*SecretBackendV2) ToSecretBackendV2OutputWithContext ¶
func (i *SecretBackendV2) ToSecretBackendV2OutputWithContext(ctx context.Context) SecretBackendV2Output
type SecretBackendV2Args ¶
type SecretBackendV2Args struct { // If true, all keys will require the cas // parameter to be set on all write requests. CasRequired pulumi.BoolPtrInput // If set, specifies the length of time before // a version is deleted. Accepts duration in integer seconds. DeleteVersionAfter pulumi.IntPtrInput // The number of versions to keep per key. MaxVersions pulumi.IntPtrInput // Path where KV-V2 engine is mounted. Mount pulumi.StringInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput }
The set of arguments for constructing a SecretBackendV2 resource.
func (SecretBackendV2Args) ElementType ¶
func (SecretBackendV2Args) ElementType() reflect.Type
type SecretBackendV2Array ¶
type SecretBackendV2Array []SecretBackendV2Input
func (SecretBackendV2Array) ElementType ¶
func (SecretBackendV2Array) ElementType() reflect.Type
func (SecretBackendV2Array) ToSecretBackendV2ArrayOutput ¶
func (i SecretBackendV2Array) ToSecretBackendV2ArrayOutput() SecretBackendV2ArrayOutput
func (SecretBackendV2Array) ToSecretBackendV2ArrayOutputWithContext ¶
func (i SecretBackendV2Array) ToSecretBackendV2ArrayOutputWithContext(ctx context.Context) SecretBackendV2ArrayOutput
type SecretBackendV2ArrayInput ¶
type SecretBackendV2ArrayInput interface { pulumi.Input ToSecretBackendV2ArrayOutput() SecretBackendV2ArrayOutput ToSecretBackendV2ArrayOutputWithContext(context.Context) SecretBackendV2ArrayOutput }
SecretBackendV2ArrayInput is an input type that accepts SecretBackendV2Array and SecretBackendV2ArrayOutput values. You can construct a concrete instance of `SecretBackendV2ArrayInput` via:
SecretBackendV2Array{ SecretBackendV2Args{...} }
type SecretBackendV2ArrayOutput ¶
type SecretBackendV2ArrayOutput struct{ *pulumi.OutputState }
func (SecretBackendV2ArrayOutput) ElementType ¶
func (SecretBackendV2ArrayOutput) ElementType() reflect.Type
func (SecretBackendV2ArrayOutput) Index ¶
func (o SecretBackendV2ArrayOutput) Index(i pulumi.IntInput) SecretBackendV2Output
func (SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutput ¶
func (o SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutput() SecretBackendV2ArrayOutput
func (SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutputWithContext ¶
func (o SecretBackendV2ArrayOutput) ToSecretBackendV2ArrayOutputWithContext(ctx context.Context) SecretBackendV2ArrayOutput
type SecretBackendV2Input ¶
type SecretBackendV2Input interface { pulumi.Input ToSecretBackendV2Output() SecretBackendV2Output ToSecretBackendV2OutputWithContext(ctx context.Context) SecretBackendV2Output }
type SecretBackendV2Map ¶
type SecretBackendV2Map map[string]SecretBackendV2Input
func (SecretBackendV2Map) ElementType ¶
func (SecretBackendV2Map) ElementType() reflect.Type
func (SecretBackendV2Map) ToSecretBackendV2MapOutput ¶
func (i SecretBackendV2Map) ToSecretBackendV2MapOutput() SecretBackendV2MapOutput
func (SecretBackendV2Map) ToSecretBackendV2MapOutputWithContext ¶
func (i SecretBackendV2Map) ToSecretBackendV2MapOutputWithContext(ctx context.Context) SecretBackendV2MapOutput
type SecretBackendV2MapInput ¶
type SecretBackendV2MapInput interface { pulumi.Input ToSecretBackendV2MapOutput() SecretBackendV2MapOutput ToSecretBackendV2MapOutputWithContext(context.Context) SecretBackendV2MapOutput }
SecretBackendV2MapInput is an input type that accepts SecretBackendV2Map and SecretBackendV2MapOutput values. You can construct a concrete instance of `SecretBackendV2MapInput` via:
SecretBackendV2Map{ "key": SecretBackendV2Args{...} }
type SecretBackendV2MapOutput ¶
type SecretBackendV2MapOutput struct{ *pulumi.OutputState }
func (SecretBackendV2MapOutput) ElementType ¶
func (SecretBackendV2MapOutput) ElementType() reflect.Type
func (SecretBackendV2MapOutput) MapIndex ¶
func (o SecretBackendV2MapOutput) MapIndex(k pulumi.StringInput) SecretBackendV2Output
func (SecretBackendV2MapOutput) ToSecretBackendV2MapOutput ¶
func (o SecretBackendV2MapOutput) ToSecretBackendV2MapOutput() SecretBackendV2MapOutput
func (SecretBackendV2MapOutput) ToSecretBackendV2MapOutputWithContext ¶
func (o SecretBackendV2MapOutput) ToSecretBackendV2MapOutputWithContext(ctx context.Context) SecretBackendV2MapOutput
type SecretBackendV2Output ¶
type SecretBackendV2Output struct{ *pulumi.OutputState }
func (SecretBackendV2Output) CasRequired ¶
func (o SecretBackendV2Output) CasRequired() pulumi.BoolOutput
If true, all keys will require the cas parameter to be set on all write requests.
func (SecretBackendV2Output) DeleteVersionAfter ¶
func (o SecretBackendV2Output) DeleteVersionAfter() pulumi.IntPtrOutput
If set, specifies the length of time before a version is deleted. Accepts duration in integer seconds.
func (SecretBackendV2Output) ElementType ¶
func (SecretBackendV2Output) ElementType() reflect.Type
func (SecretBackendV2Output) MaxVersions ¶
func (o SecretBackendV2Output) MaxVersions() pulumi.IntOutput
The number of versions to keep per key.
func (SecretBackendV2Output) Mount ¶
func (o SecretBackendV2Output) Mount() pulumi.StringOutput
Path where KV-V2 engine is mounted.
func (SecretBackendV2Output) Namespace ¶
func (o SecretBackendV2Output) Namespace() pulumi.StringPtrOutput
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#namespace). *Available only for Vault Enterprise*.
func (SecretBackendV2Output) ToSecretBackendV2Output ¶
func (o SecretBackendV2Output) ToSecretBackendV2Output() SecretBackendV2Output
func (SecretBackendV2Output) ToSecretBackendV2OutputWithContext ¶
func (o SecretBackendV2Output) ToSecretBackendV2OutputWithContext(ctx context.Context) SecretBackendV2Output
type SecretBackendV2State ¶
type SecretBackendV2State struct { // If true, all keys will require the cas // parameter to be set on all write requests. CasRequired pulumi.BoolPtrInput // If set, specifies the length of time before // a version is deleted. Accepts duration in integer seconds. DeleteVersionAfter pulumi.IntPtrInput // The number of versions to keep per key. MaxVersions pulumi.IntPtrInput // Path where KV-V2 engine is mounted. Mount pulumi.StringPtrInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput }
func (SecretBackendV2State) ElementType ¶
func (SecretBackendV2State) ElementType() reflect.Type
type SecretInput ¶
type SecretInput interface { pulumi.Input ToSecretOutput() SecretOutput ToSecretOutputWithContext(ctx context.Context) SecretOutput }
type SecretMap ¶
type SecretMap map[string]SecretInput
func (SecretMap) ElementType ¶
func (SecretMap) ToSecretMapOutput ¶
func (i SecretMap) ToSecretMapOutput() SecretMapOutput
func (SecretMap) ToSecretMapOutputWithContext ¶
func (i SecretMap) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput
type SecretMapInput ¶
type SecretMapInput interface { pulumi.Input ToSecretMapOutput() SecretMapOutput ToSecretMapOutputWithContext(context.Context) SecretMapOutput }
SecretMapInput is an input type that accepts SecretMap and SecretMapOutput values. You can construct a concrete instance of `SecretMapInput` via:
SecretMap{ "key": SecretArgs{...} }
type SecretMapOutput ¶
type SecretMapOutput struct{ *pulumi.OutputState }
func (SecretMapOutput) ElementType ¶
func (SecretMapOutput) ElementType() reflect.Type
func (SecretMapOutput) MapIndex ¶
func (o SecretMapOutput) MapIndex(k pulumi.StringInput) SecretOutput
func (SecretMapOutput) ToSecretMapOutput ¶
func (o SecretMapOutput) ToSecretMapOutput() SecretMapOutput
func (SecretMapOutput) ToSecretMapOutputWithContext ¶
func (o SecretMapOutput) ToSecretMapOutputWithContext(ctx context.Context) SecretMapOutput
type SecretOutput ¶
type SecretOutput struct{ *pulumi.OutputState }
func (SecretOutput) Data ¶
func (o SecretOutput) Data() pulumi.MapOutput
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.
func (SecretOutput) DataJson ¶
func (o SecretOutput) DataJson() pulumi.StringOutput
JSON-encoded string that will be written as the secret data at the given path.
func (SecretOutput) ElementType ¶
func (SecretOutput) ElementType() reflect.Type
func (SecretOutput) Namespace ¶
func (o SecretOutput) Namespace() pulumi.StringPtrOutput
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#namespace). *Available only for Vault Enterprise*.
func (SecretOutput) Path ¶
func (o SecretOutput) Path() pulumi.StringOutput
Full path of the KV-V1 secret.
func (SecretOutput) ToSecretOutput ¶
func (o SecretOutput) ToSecretOutput() SecretOutput
func (SecretOutput) ToSecretOutputWithContext ¶
func (o SecretOutput) ToSecretOutputWithContext(ctx context.Context) SecretOutput
type SecretState ¶
type SecretState struct { // 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.MapInput // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringPtrInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput // Full path of the KV-V1 secret. Path pulumi.StringPtrInput }
func (SecretState) ElementType ¶
func (SecretState) ElementType() reflect.Type
type SecretV2 ¶
type SecretV2 struct { pulumi.CustomResourceState // This flag is required if `casRequired` is set to true // on either the secret or the engine's config. In order for a // write operation to be successful, cas must be set to the current version // of the secret. Cas pulumi.IntPtrOutput `pulumi:"cas"` // A nested block that allows configuring metadata for the // KV secret. Refer to the // Configuration Options for more info. CustomMetadata SecretV2CustomMetadataOutput `pulumi:"customMetadata"` // 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.MapOutput `pulumi:"data"` // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringOutput `pulumi:"dataJson"` // If set to true, permanently deletes all // versions for the specified key. DeleteAllVersions pulumi.BoolPtrOutput `pulumi:"deleteAllVersions"` // If set to true, disables reading secret from Vault; // note: drift won't be detected. DisableRead pulumi.BoolPtrOutput `pulumi:"disableRead"` // Metadata associated with this secret read from Vault. Metadata pulumi.MapOutput `pulumi:"metadata"` // Path where KV-V2 engine is mounted. Mount pulumi.StringOutput `pulumi:"mount"` // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringOutput `pulumi:"name"` // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrOutput `pulumi:"namespace"` // An object that holds option settings. Options pulumi.MapOutput `pulumi:"options"` // Full path where the KV-V2 secret will be written. Path pulumi.StringOutput `pulumi:"path"` }
Writes a KV-V2 secret to a given path in Vault.
For more information on Vault's KV-V2 secret backend [see here](https://www.vaultproject.io/docs/secrets/kv/kv-v2).
## Example Usage
```go package main
import (
"encoding/json" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault" "github.com/pulumi/pulumi-vault/sdk/v5/go/vault/kv" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { kvv2, err := vault.NewMount(ctx, "kvv2", &vault.MountArgs{ Path: pulumi.String("kvv2"), Type: pulumi.String("kv"), Options: pulumi.Map{ "version": pulumi.Any("2"), }, Description: pulumi.String("KV Version 2 secret engine mount"), }) if err != nil { return err } tmpJSON0, err := json.Marshal(map[string]interface{}{ "zip": "zap", "foo": "bar", }) if err != nil { return err } json0 := string(tmpJSON0) _, err = kv.NewSecretV2(ctx, "example", &kv.SecretV2Args{ Mount: kvv2.Path, Cas: pulumi.Int(1), DeleteAllVersions: pulumi.Bool(true), DataJson: pulumi.String(json0), CustomMetadata: &kv.SecretV2CustomMetadataArgs{ MaxVersions: pulumi.Int(5), Data: pulumi.Map{ "foo": pulumi.Any("vault@example.com"), "bar": pulumi.Any("12345"), }, }, }) if err != nil { return err } return nil }) }
``` ## 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).
### Custom Metadata Configuration Options
* `maxVersions` - (Optional) The number of versions to keep per key.
* `casRequired` - (Optional) If true, all keys will require the cas parameter to be set on all write requests.
* `deleteVersionAfter` - (Optional) If set, specifies the length of time before a version is deleted. Accepts duration in integer seconds.
* `data` - (Optional) A string to string map describing the secret.
## Import
KV-V2 secrets can be imported using the `path`, e.g.
```sh
$ pulumi import vault:kv/secretV2:SecretV2 example kvv2/data/secret
```
func GetSecretV2 ¶
func GetSecretV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SecretV2State, opts ...pulumi.ResourceOption) (*SecretV2, error)
GetSecretV2 gets an existing SecretV2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewSecretV2 ¶
func NewSecretV2(ctx *pulumi.Context, name string, args *SecretV2Args, opts ...pulumi.ResourceOption) (*SecretV2, error)
NewSecretV2 registers a new resource with the given unique name, arguments, and options.
func (*SecretV2) ElementType ¶
func (*SecretV2) ToSecretV2Output ¶
func (i *SecretV2) ToSecretV2Output() SecretV2Output
func (*SecretV2) ToSecretV2OutputWithContext ¶
func (i *SecretV2) ToSecretV2OutputWithContext(ctx context.Context) SecretV2Output
type SecretV2Args ¶
type SecretV2Args struct { // This flag is required if `casRequired` is set to true // on either the secret or the engine's config. In order for a // write operation to be successful, cas must be set to the current version // of the secret. Cas pulumi.IntPtrInput // A nested block that allows configuring metadata for the // KV secret. Refer to the // Configuration Options for more info. CustomMetadata SecretV2CustomMetadataPtrInput // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringInput // If set to true, permanently deletes all // versions for the specified key. DeleteAllVersions pulumi.BoolPtrInput // If set to true, disables reading secret from Vault; // note: drift won't be detected. DisableRead pulumi.BoolPtrInput // Path where KV-V2 engine is mounted. Mount pulumi.StringInput // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringPtrInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput // An object that holds option settings. Options pulumi.MapInput }
The set of arguments for constructing a SecretV2 resource.
func (SecretV2Args) ElementType ¶
func (SecretV2Args) ElementType() reflect.Type
type SecretV2Array ¶
type SecretV2Array []SecretV2Input
func (SecretV2Array) ElementType ¶
func (SecretV2Array) ElementType() reflect.Type
func (SecretV2Array) ToSecretV2ArrayOutput ¶
func (i SecretV2Array) ToSecretV2ArrayOutput() SecretV2ArrayOutput
func (SecretV2Array) ToSecretV2ArrayOutputWithContext ¶
func (i SecretV2Array) ToSecretV2ArrayOutputWithContext(ctx context.Context) SecretV2ArrayOutput
type SecretV2ArrayInput ¶
type SecretV2ArrayInput interface { pulumi.Input ToSecretV2ArrayOutput() SecretV2ArrayOutput ToSecretV2ArrayOutputWithContext(context.Context) SecretV2ArrayOutput }
SecretV2ArrayInput is an input type that accepts SecretV2Array and SecretV2ArrayOutput values. You can construct a concrete instance of `SecretV2ArrayInput` via:
SecretV2Array{ SecretV2Args{...} }
type SecretV2ArrayOutput ¶
type SecretV2ArrayOutput struct{ *pulumi.OutputState }
func (SecretV2ArrayOutput) ElementType ¶
func (SecretV2ArrayOutput) ElementType() reflect.Type
func (SecretV2ArrayOutput) Index ¶
func (o SecretV2ArrayOutput) Index(i pulumi.IntInput) SecretV2Output
func (SecretV2ArrayOutput) ToSecretV2ArrayOutput ¶
func (o SecretV2ArrayOutput) ToSecretV2ArrayOutput() SecretV2ArrayOutput
func (SecretV2ArrayOutput) ToSecretV2ArrayOutputWithContext ¶
func (o SecretV2ArrayOutput) ToSecretV2ArrayOutputWithContext(ctx context.Context) SecretV2ArrayOutput
type SecretV2CustomMetadata ¶ added in v5.8.0
type SecretV2CustomMetadata struct { // If true, all keys will require the cas parameter to be set on all write requests. CasRequired *bool `pulumi:"casRequired"` // 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 map[string]interface{} `pulumi:"data"` // If set, specifies the length of time before a version is deleted. DeleteVersionAfter *int `pulumi:"deleteVersionAfter"` // The number of versions to keep per key. MaxVersions *int `pulumi:"maxVersions"` }
type SecretV2CustomMetadataArgs ¶ added in v5.8.0
type SecretV2CustomMetadataArgs struct { // If true, all keys will require the cas parameter to be set on all write requests. CasRequired pulumi.BoolPtrInput `pulumi:"casRequired"` // 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.MapInput `pulumi:"data"` // If set, specifies the length of time before a version is deleted. DeleteVersionAfter pulumi.IntPtrInput `pulumi:"deleteVersionAfter"` // The number of versions to keep per key. MaxVersions pulumi.IntPtrInput `pulumi:"maxVersions"` }
func (SecretV2CustomMetadataArgs) ElementType ¶ added in v5.8.0
func (SecretV2CustomMetadataArgs) ElementType() reflect.Type
func (SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutput ¶ added in v5.8.0
func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutput() SecretV2CustomMetadataOutput
func (SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutputWithContext ¶ added in v5.8.0
func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataOutputWithContext(ctx context.Context) SecretV2CustomMetadataOutput
func (SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutput ¶ added in v5.8.0
func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
func (SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutputWithContext ¶ added in v5.8.0
func (i SecretV2CustomMetadataArgs) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
type SecretV2CustomMetadataInput ¶ added in v5.8.0
type SecretV2CustomMetadataInput interface { pulumi.Input ToSecretV2CustomMetadataOutput() SecretV2CustomMetadataOutput ToSecretV2CustomMetadataOutputWithContext(context.Context) SecretV2CustomMetadataOutput }
SecretV2CustomMetadataInput is an input type that accepts SecretV2CustomMetadataArgs and SecretV2CustomMetadataOutput values. You can construct a concrete instance of `SecretV2CustomMetadataInput` via:
SecretV2CustomMetadataArgs{...}
type SecretV2CustomMetadataOutput ¶ added in v5.8.0
type SecretV2CustomMetadataOutput struct{ *pulumi.OutputState }
func (SecretV2CustomMetadataOutput) CasRequired ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) CasRequired() pulumi.BoolPtrOutput
If true, all keys will require the cas parameter to be set on all write requests.
func (SecretV2CustomMetadataOutput) Data ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) Data() pulumi.MapOutput
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.
func (SecretV2CustomMetadataOutput) DeleteVersionAfter ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) DeleteVersionAfter() pulumi.IntPtrOutput
If set, specifies the length of time before a version is deleted.
func (SecretV2CustomMetadataOutput) ElementType ¶ added in v5.8.0
func (SecretV2CustomMetadataOutput) ElementType() reflect.Type
func (SecretV2CustomMetadataOutput) MaxVersions ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) MaxVersions() pulumi.IntPtrOutput
The number of versions to keep per key.
func (SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutput ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutput() SecretV2CustomMetadataOutput
func (SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutputWithContext ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataOutputWithContext(ctx context.Context) SecretV2CustomMetadataOutput
func (SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutput ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
func (SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutputWithContext ¶ added in v5.8.0
func (o SecretV2CustomMetadataOutput) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
type SecretV2CustomMetadataPtrInput ¶ added in v5.8.0
type SecretV2CustomMetadataPtrInput interface { pulumi.Input ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput ToSecretV2CustomMetadataPtrOutputWithContext(context.Context) SecretV2CustomMetadataPtrOutput }
SecretV2CustomMetadataPtrInput is an input type that accepts SecretV2CustomMetadataArgs, SecretV2CustomMetadataPtr and SecretV2CustomMetadataPtrOutput values. You can construct a concrete instance of `SecretV2CustomMetadataPtrInput` via:
SecretV2CustomMetadataArgs{...} or: nil
func SecretV2CustomMetadataPtr ¶ added in v5.8.0
func SecretV2CustomMetadataPtr(v *SecretV2CustomMetadataArgs) SecretV2CustomMetadataPtrInput
type SecretV2CustomMetadataPtrOutput ¶ added in v5.8.0
type SecretV2CustomMetadataPtrOutput struct{ *pulumi.OutputState }
func (SecretV2CustomMetadataPtrOutput) CasRequired ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) CasRequired() pulumi.BoolPtrOutput
If true, all keys will require the cas parameter to be set on all write requests.
func (SecretV2CustomMetadataPtrOutput) Data ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) Data() pulumi.MapOutput
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.
func (SecretV2CustomMetadataPtrOutput) DeleteVersionAfter ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) DeleteVersionAfter() pulumi.IntPtrOutput
If set, specifies the length of time before a version is deleted.
func (SecretV2CustomMetadataPtrOutput) Elem ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) Elem() SecretV2CustomMetadataOutput
func (SecretV2CustomMetadataPtrOutput) ElementType ¶ added in v5.8.0
func (SecretV2CustomMetadataPtrOutput) ElementType() reflect.Type
func (SecretV2CustomMetadataPtrOutput) MaxVersions ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) MaxVersions() pulumi.IntPtrOutput
The number of versions to keep per key.
func (SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutput ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutput() SecretV2CustomMetadataPtrOutput
func (SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutputWithContext ¶ added in v5.8.0
func (o SecretV2CustomMetadataPtrOutput) ToSecretV2CustomMetadataPtrOutputWithContext(ctx context.Context) SecretV2CustomMetadataPtrOutput
type SecretV2Input ¶
type SecretV2Input interface { pulumi.Input ToSecretV2Output() SecretV2Output ToSecretV2OutputWithContext(ctx context.Context) SecretV2Output }
type SecretV2Map ¶
type SecretV2Map map[string]SecretV2Input
func (SecretV2Map) ElementType ¶
func (SecretV2Map) ElementType() reflect.Type
func (SecretV2Map) ToSecretV2MapOutput ¶
func (i SecretV2Map) ToSecretV2MapOutput() SecretV2MapOutput
func (SecretV2Map) ToSecretV2MapOutputWithContext ¶
func (i SecretV2Map) ToSecretV2MapOutputWithContext(ctx context.Context) SecretV2MapOutput
type SecretV2MapInput ¶
type SecretV2MapInput interface { pulumi.Input ToSecretV2MapOutput() SecretV2MapOutput ToSecretV2MapOutputWithContext(context.Context) SecretV2MapOutput }
SecretV2MapInput is an input type that accepts SecretV2Map and SecretV2MapOutput values. You can construct a concrete instance of `SecretV2MapInput` via:
SecretV2Map{ "key": SecretV2Args{...} }
type SecretV2MapOutput ¶
type SecretV2MapOutput struct{ *pulumi.OutputState }
func (SecretV2MapOutput) ElementType ¶
func (SecretV2MapOutput) ElementType() reflect.Type
func (SecretV2MapOutput) MapIndex ¶
func (o SecretV2MapOutput) MapIndex(k pulumi.StringInput) SecretV2Output
func (SecretV2MapOutput) ToSecretV2MapOutput ¶
func (o SecretV2MapOutput) ToSecretV2MapOutput() SecretV2MapOutput
func (SecretV2MapOutput) ToSecretV2MapOutputWithContext ¶
func (o SecretV2MapOutput) ToSecretV2MapOutputWithContext(ctx context.Context) SecretV2MapOutput
type SecretV2Output ¶
type SecretV2Output struct{ *pulumi.OutputState }
func (SecretV2Output) Cas ¶
func (o SecretV2Output) Cas() pulumi.IntPtrOutput
This flag is required if `casRequired` is set to true on either the secret or the engine's config. In order for a write operation to be successful, cas must be set to the current version of the secret.
func (SecretV2Output) CustomMetadata ¶ added in v5.8.0
func (o SecretV2Output) CustomMetadata() SecretV2CustomMetadataOutput
A nested block that allows configuring metadata for the KV secret. Refer to the Configuration Options for more info.
func (SecretV2Output) Data ¶
func (o SecretV2Output) Data() pulumi.MapOutput
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.
func (SecretV2Output) DataJson ¶
func (o SecretV2Output) DataJson() pulumi.StringOutput
JSON-encoded string that will be written as the secret data at the given path.
func (SecretV2Output) DeleteAllVersions ¶
func (o SecretV2Output) DeleteAllVersions() pulumi.BoolPtrOutput
If set to true, permanently deletes all versions for the specified key.
func (SecretV2Output) DisableRead ¶
func (o SecretV2Output) DisableRead() pulumi.BoolPtrOutput
If set to true, disables reading secret from Vault; note: drift won't be detected.
func (SecretV2Output) ElementType ¶
func (SecretV2Output) ElementType() reflect.Type
func (SecretV2Output) Metadata ¶
func (o SecretV2Output) Metadata() pulumi.MapOutput
Metadata associated with this secret read from Vault.
func (SecretV2Output) Mount ¶
func (o SecretV2Output) Mount() pulumi.StringOutput
Path where KV-V2 engine is mounted.
func (SecretV2Output) Name ¶
func (o SecretV2Output) Name() pulumi.StringOutput
Full name of the secret. For a nested secret the name is the nested path excluding the mount and data prefix. For example, for a secret at `kvv2/data/foo/bar/baz` the name is `foo/bar/baz`.
func (SecretV2Output) Namespace ¶
func (o SecretV2Output) Namespace() pulumi.StringPtrOutput
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#namespace). *Available only for Vault Enterprise*.
func (SecretV2Output) Options ¶
func (o SecretV2Output) Options() pulumi.MapOutput
An object that holds option settings.
func (SecretV2Output) Path ¶
func (o SecretV2Output) Path() pulumi.StringOutput
Full path where the KV-V2 secret will be written.
func (SecretV2Output) ToSecretV2Output ¶
func (o SecretV2Output) ToSecretV2Output() SecretV2Output
func (SecretV2Output) ToSecretV2OutputWithContext ¶
func (o SecretV2Output) ToSecretV2OutputWithContext(ctx context.Context) SecretV2Output
type SecretV2State ¶
type SecretV2State struct { // This flag is required if `casRequired` is set to true // on either the secret or the engine's config. In order for a // write operation to be successful, cas must be set to the current version // of the secret. Cas pulumi.IntPtrInput // A nested block that allows configuring metadata for the // KV secret. Refer to the // Configuration Options for more info. CustomMetadata SecretV2CustomMetadataPtrInput // 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.MapInput // JSON-encoded string that will be // written as the secret data at the given path. DataJson pulumi.StringPtrInput // If set to true, permanently deletes all // versions for the specified key. DeleteAllVersions pulumi.BoolPtrInput // If set to true, disables reading secret from Vault; // note: drift won't be detected. DisableRead pulumi.BoolPtrInput // Metadata associated with this secret read from Vault. Metadata pulumi.MapInput // Path where KV-V2 engine is mounted. Mount pulumi.StringPtrInput // Full name of the secret. For a nested secret // the name is the nested path excluding the mount and data // prefix. For example, for a secret at `kvv2/data/foo/bar/baz` // the name is `foo/bar/baz`. Name pulumi.StringPtrInput // 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#namespace). // *Available only for Vault Enterprise*. Namespace pulumi.StringPtrInput // An object that holds option settings. Options pulumi.MapInput // Full path where the KV-V2 secret will be written. Path pulumi.StringPtrInput }
func (SecretV2State) ElementType ¶
func (SecretV2State) ElementType() reflect.Type