vault.transit.SecretCacheConfig
Explore with Pulumi AI
Configure the cache for the Transit Secret Backend in Vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const transit = new vault.Mount("transit", {
path: "transit",
type: "transit",
description: "Example description",
defaultLeaseTtlSeconds: 3600,
maxLeaseTtlSeconds: 86400,
});
const cfg = new vault.transit.SecretCacheConfig("cfg", {
backend: transit.path,
size: 500,
});
import pulumi
import pulumi_vault as vault
transit = vault.Mount("transit",
path="transit",
type="transit",
description="Example description",
default_lease_ttl_seconds=3600,
max_lease_ttl_seconds=86400)
cfg = vault.transit.SecretCacheConfig("cfg",
backend=transit.path,
size=500)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/transit"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
transit, err := vault.NewMount(ctx, "transit", &vault.MountArgs{
Path: pulumi.String("transit"),
Type: pulumi.String("transit"),
Description: pulumi.String("Example description"),
DefaultLeaseTtlSeconds: pulumi.Int(3600),
MaxLeaseTtlSeconds: pulumi.Int(86400),
})
if err != nil {
return err
}
_, err = transit.NewSecretCacheConfig(ctx, "cfg", &transit.SecretCacheConfigArgs{
Backend: transit.Path,
Size: pulumi.Int(500),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var transit = new Vault.Mount("transit", new()
{
Path = "transit",
Type = "transit",
Description = "Example description",
DefaultLeaseTtlSeconds = 3600,
MaxLeaseTtlSeconds = 86400,
});
var cfg = new Vault.Transit.SecretCacheConfig("cfg", new()
{
Backend = transit.Path,
Size = 500,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.Mount;
import com.pulumi.vault.MountArgs;
import com.pulumi.vault.transit.SecretCacheConfig;
import com.pulumi.vault.transit.SecretCacheConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var transit = new Mount("transit", MountArgs.builder()
.path("transit")
.type("transit")
.description("Example description")
.defaultLeaseTtlSeconds(3600)
.maxLeaseTtlSeconds(86400)
.build());
var cfg = new SecretCacheConfig("cfg", SecretCacheConfigArgs.builder()
.backend(transit.path())
.size(500)
.build());
}
}
resources:
transit:
type: vault:Mount
properties:
path: transit
type: transit
description: Example description
defaultLeaseTtlSeconds: 3600
maxLeaseTtlSeconds: 86400
cfg:
type: vault:transit:SecretCacheConfig
properties:
backend: ${transit.path}
size: 500
Create SecretCacheConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretCacheConfig(name: string, args: SecretCacheConfigArgs, opts?: CustomResourceOptions);
@overload
def SecretCacheConfig(resource_name: str,
args: SecretCacheConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecretCacheConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
size: Optional[int] = None,
namespace: Optional[str] = None)
func NewSecretCacheConfig(ctx *Context, name string, args SecretCacheConfigArgs, opts ...ResourceOption) (*SecretCacheConfig, error)
public SecretCacheConfig(string name, SecretCacheConfigArgs args, CustomResourceOptions? opts = null)
public SecretCacheConfig(String name, SecretCacheConfigArgs args)
public SecretCacheConfig(String name, SecretCacheConfigArgs args, CustomResourceOptions options)
type: vault:transit:SecretCacheConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecretCacheConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecretCacheConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecretCacheConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretCacheConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretCacheConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var secretCacheConfigResource = new Vault.Transit.SecretCacheConfig("secretCacheConfigResource", new()
{
Backend = "string",
Size = 0,
Namespace = "string",
});
example, err := transit.NewSecretCacheConfig(ctx, "secretCacheConfigResource", &transit.SecretCacheConfigArgs{
Backend: pulumi.String("string"),
Size: pulumi.Int(0),
Namespace: pulumi.String("string"),
})
var secretCacheConfigResource = new SecretCacheConfig("secretCacheConfigResource", SecretCacheConfigArgs.builder()
.backend("string")
.size(0)
.namespace("string")
.build());
secret_cache_config_resource = vault.transit.SecretCacheConfig("secretCacheConfigResource",
backend="string",
size=0,
namespace="string")
const secretCacheConfigResource = new vault.transit.SecretCacheConfig("secretCacheConfigResource", {
backend: "string",
size: 0,
namespace: "string",
});
type: vault:transit:SecretCacheConfig
properties:
backend: string
namespace: string
size: 0
SecretCacheConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecretCacheConfig resource accepts the following input properties:
- Backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - Size int
- The number of cache entries. 0 means unlimited.
- Namespace string
- 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. Available only for Vault Enterprise.
- Backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - Size int
- The number of cache entries. 0 means unlimited.
- Namespace string
- 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. Available only for Vault Enterprise.
- backend String
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - size Integer
- The number of cache entries. 0 means unlimited.
- namespace String
- 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. Available only for Vault Enterprise.
- backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - size number
- The number of cache entries. 0 means unlimited.
- namespace string
- 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. Available only for Vault Enterprise.
- backend str
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - size int
- The number of cache entries. 0 means unlimited.
- namespace str
- 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. Available only for Vault Enterprise.
- backend String
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - size Number
- The number of cache entries. 0 means unlimited.
- namespace String
- 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. Available only for Vault Enterprise.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretCacheConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SecretCacheConfig Resource
Get an existing SecretCacheConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecretCacheConfigState, opts?: CustomResourceOptions): SecretCacheConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
namespace: Optional[str] = None,
size: Optional[int] = None) -> SecretCacheConfig
func GetSecretCacheConfig(ctx *Context, name string, id IDInput, state *SecretCacheConfigState, opts ...ResourceOption) (*SecretCacheConfig, error)
public static SecretCacheConfig Get(string name, Input<string> id, SecretCacheConfigState? state, CustomResourceOptions? opts = null)
public static SecretCacheConfig get(String name, Output<String> id, SecretCacheConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - Namespace string
- 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. Available only for Vault Enterprise. - Size int
- The number of cache entries. 0 means unlimited.
- Backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - Namespace string
- 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. Available only for Vault Enterprise. - Size int
- The number of cache entries. 0 means unlimited.
- backend String
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - namespace String
- 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. Available only for Vault Enterprise. - size Integer
- The number of cache entries. 0 means unlimited.
- backend string
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - namespace string
- 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. Available only for Vault Enterprise. - size number
- The number of cache entries. 0 means unlimited.
- backend str
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - namespace str
- 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. Available only for Vault Enterprise. - size int
- The number of cache entries. 0 means unlimited.
- backend String
- The path the transit secret backend is mounted at, with no leading or trailing
/
s. - namespace String
- 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. Available only for Vault Enterprise. - size Number
- The number of cache entries. 0 means unlimited.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.