vault.pkiSecret.SecretBackendKey
Explore with Pulumi AI
Creates a key on a PKI Secret Backend for Vault.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
pki:
type: vault:Mount
properties:
path: pki
type: pki
defaultLeaseTtlSeconds: 3600
maxLeaseTtlSeconds: 86400
key:
type: vault:pkiSecret:SecretBackendKey
properties:
mount: ${pki.path}
type: exported
keyName: example-key
keyType: rsa
keyBits: '2048'
Create SecretBackendKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretBackendKey(name: string, args: SecretBackendKeyArgs, opts?: CustomResourceOptions);
@overload
def SecretBackendKey(resource_name: str,
args: SecretBackendKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecretBackendKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
type: Optional[str] = None,
key_bits: Optional[int] = None,
key_name: Optional[str] = None,
key_type: Optional[str] = None,
managed_key_id: Optional[str] = None,
managed_key_name: Optional[str] = None,
namespace: Optional[str] = None)
func NewSecretBackendKey(ctx *Context, name string, args SecretBackendKeyArgs, opts ...ResourceOption) (*SecretBackendKey, error)
public SecretBackendKey(string name, SecretBackendKeyArgs args, CustomResourceOptions? opts = null)
public SecretBackendKey(String name, SecretBackendKeyArgs args)
public SecretBackendKey(String name, SecretBackendKeyArgs args, CustomResourceOptions options)
type: vault:pkiSecret:SecretBackendKey
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 SecretBackendKeyArgs
- 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 SecretBackendKeyArgs
- 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 SecretBackendKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretBackendKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretBackendKeyArgs
- 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 secretBackendKeyResource = new Vault.PkiSecret.SecretBackendKey("secretBackendKeyResource", new()
{
Backend = "string",
Type = "string",
KeyBits = 0,
KeyName = "string",
KeyType = "string",
ManagedKeyId = "string",
ManagedKeyName = "string",
Namespace = "string",
});
example, err := pkiSecret.NewSecretBackendKey(ctx, "secretBackendKeyResource", &pkiSecret.SecretBackendKeyArgs{
Backend: pulumi.String("string"),
Type: pulumi.String("string"),
KeyBits: pulumi.Int(0),
KeyName: pulumi.String("string"),
KeyType: pulumi.String("string"),
ManagedKeyId: pulumi.String("string"),
ManagedKeyName: pulumi.String("string"),
Namespace: pulumi.String("string"),
})
var secretBackendKeyResource = new SecretBackendKey("secretBackendKeyResource", SecretBackendKeyArgs.builder()
.backend("string")
.type("string")
.keyBits(0)
.keyName("string")
.keyType("string")
.managedKeyId("string")
.managedKeyName("string")
.namespace("string")
.build());
secret_backend_key_resource = vault.pki_secret.SecretBackendKey("secretBackendKeyResource",
backend="string",
type="string",
key_bits=0,
key_name="string",
key_type="string",
managed_key_id="string",
managed_key_name="string",
namespace="string")
const secretBackendKeyResource = new vault.pkisecret.SecretBackendKey("secretBackendKeyResource", {
backend: "string",
type: "string",
keyBits: 0,
keyName: "string",
keyType: "string",
managedKeyId: "string",
managedKeyName: "string",
namespace: "string",
});
type: vault:pkiSecret:SecretBackendKey
properties:
backend: string
keyBits: 0
keyName: string
keyType: string
managedKeyId: string
managedKeyName: string
namespace: string
type: string
SecretBackendKey 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 SecretBackendKey resource accepts the following input properties:
- Backend string
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - Type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - Key
Bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - Key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - Key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - Managed
Key stringId - The managed key's UUID.
- Managed
Key stringName - The managed key's configured name.
- 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - Type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - Key
Bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - Key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - Key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - Managed
Key stringId - The managed key's UUID.
- Managed
Key stringName - The managed key's configured name.
- 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - type String
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - key
Bits Integer - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Name String - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type String - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key StringId - The managed key's UUID.
- managed
Key StringName - The managed key's configured name.
- 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - key
Bits number - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key stringId - The managed key's UUID.
- managed
Key stringName - The managed key's configured name.
- 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - type str
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - key_
bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key_
name str - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key_
type str - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed_
key_ strid - The managed key's UUID.
- managed_
key_ strname - The managed key's configured name.
- 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - type String
- Specifies the type of the key to create. Can be
exported
,internal
orkms
. - key
Bits Number - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Name String - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type String - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key StringId - The managed key's UUID.
- managed
Key StringName - The managed key's configured name.
- 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 SecretBackendKey resource produces the following output properties:
Look up Existing SecretBackendKey Resource
Get an existing SecretBackendKey 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?: SecretBackendKeyState, opts?: CustomResourceOptions): SecretBackendKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
key_bits: Optional[int] = None,
key_id: Optional[str] = None,
key_name: Optional[str] = None,
key_type: Optional[str] = None,
managed_key_id: Optional[str] = None,
managed_key_name: Optional[str] = None,
namespace: Optional[str] = None,
type: Optional[str] = None) -> SecretBackendKey
func GetSecretBackendKey(ctx *Context, name string, id IDInput, state *SecretBackendKeyState, opts ...ResourceOption) (*SecretBackendKey, error)
public static SecretBackendKey Get(string name, Input<string> id, SecretBackendKeyState? state, CustomResourceOptions? opts = null)
public static SecretBackendKey get(String name, Output<String> id, SecretBackendKeyState 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 PKI secret backend is mounted at, with no leading or trailing
/
s. - Key
Bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - Key
Id string - ID of the generated key.
- Key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - Key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - Managed
Key stringId - The managed key's UUID.
- Managed
Key stringName - The managed key's configured name.
- 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. - Type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
- Backend string
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - Key
Bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - Key
Id string - ID of the generated key.
- Key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - Key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - Managed
Key stringId - The managed key's UUID.
- Managed
Key stringName - The managed key's configured name.
- 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. - Type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
- backend String
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - key
Bits Integer - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Id String - ID of the generated key.
- key
Name String - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type String - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key StringId - The managed key's UUID.
- managed
Key StringName - The managed key's configured name.
- 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. - type String
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
- backend string
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - key
Bits number - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Id string - ID of the generated key.
- key
Name string - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type string - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key stringId - The managed key's UUID.
- managed
Key stringName - The managed key's configured name.
- 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. - type string
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
- backend str
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - key_
bits int - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key_
id str - ID of the generated key.
- key_
name str - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key_
type str - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed_
key_ strid - The managed key's UUID.
- managed_
key_ strname - The managed key's configured name.
- 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. - type str
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
- backend String
- The path the PKI secret backend is mounted at, with no leading or trailing
/
s. - key
Bits Number - Specifies the number of bits to use for the generated keys.
Allowed values are 0 (universal default); with
key_type=rsa
, allowed values are: 2048 (default), 3072, or 4096; withkey_type=ec
, allowed values are: 224, 256 (default), 384, or 521; ignored withkey_type=ed25519
. - key
Id String - ID of the generated key.
- key
Name String - When a new key is created with this request, optionally specifies the name for this.
The global ref
default
may not be used as a name. - key
Type String - Specifies the desired key type; must be
rsa
,ed25519
orec
. - managed
Key StringId - The managed key's UUID.
- managed
Key StringName - The managed key's configured name.
- 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. - type String
- Specifies the type of the key to create. Can be
exported
,internal
orkms
.
Import
PKI secret backend key can be imported using the id
, e.g.
$ pulumi import vault:pkiSecret/secretBackendKey:SecretBackendKey key pki/key/bf9b0d48-d0dd-652c-30be-77d04fc7e94d
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.