We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Key Vault Key.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new Azure.KeyVault.KeyVaultArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
TenantId = current.Apply(current => current.TenantId),
SkuName = "premium",
SoftDeleteRetentionDays = 7,
AccessPolicies =
{
new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
{
TenantId = current.Apply(current => current.TenantId),
ObjectId = current.Apply(current => current.ObjectId),
KeyPermissions =
{
"create",
"get",
"purge",
"recover",
},
SecretPermissions =
{
"set",
},
},
},
});
var generated = new Azure.KeyVault.Key("generated", new Azure.KeyVault.KeyArgs
{
KeyVaultId = exampleKeyVault.Id,
KeyType = "RSA",
KeySize = 2048,
KeyOpts =
{
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/keyvault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
TenantId: pulumi.String(current.TenantId),
SkuName: pulumi.String("premium"),
SoftDeleteRetentionDays: pulumi.Int(7),
AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
&keyvault.KeyVaultAccessPolicyArgs{
TenantId: pulumi.String(current.TenantId),
ObjectId: pulumi.String(current.ObjectId),
KeyPermissions: pulumi.StringArray{
pulumi.String("create"),
pulumi.String("get"),
pulumi.String("purge"),
pulumi.String("recover"),
},
SecretPermissions: pulumi.StringArray{
pulumi.String("set"),
},
},
},
})
if err != nil {
return err
}
_, err = keyvault.NewKey(ctx, "generated", &keyvault.KeyArgs{
KeyVaultId: exampleKeyVault.ID(),
KeyType: pulumi.String("RSA"),
KeySize: pulumi.Int(2048),
KeyOpts: pulumi.StringArray{
pulumi.String("decrypt"),
pulumi.String("encrypt"),
pulumi.String("sign"),
pulumi.String("unwrapKey"),
pulumi.String("verify"),
pulumi.String("wrapKey"),
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
tenantId: current.then(current => current.tenantId),
skuName: "premium",
softDeleteRetentionDays: 7,
accessPolicies: [{
tenantId: current.then(current => current.tenantId),
objectId: current.then(current => current.objectId),
keyPermissions: [
"create",
"get",
"purge",
"recover",
],
secretPermissions: ["set"],
}],
});
const generated = new azure.keyvault.Key("generated", {
keyVaultId: exampleKeyVault.id,
keyType: "RSA",
keySize: 2048,
keyOpts: [
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey",
],
});
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
tenant_id=current.tenant_id,
sku_name="premium",
soft_delete_retention_days=7,
access_policies=[azure.keyvault.KeyVaultAccessPolicyArgs(
tenant_id=current.tenant_id,
object_id=current.object_id,
key_permissions=[
"create",
"get",
"purge",
"recover",
],
secret_permissions=["set"],
)])
generated = azure.keyvault.Key("generated",
key_vault_id=example_key_vault.id,
key_type="RSA",
key_size=2048,
key_opts=[
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey",
])
Example coming soon!
Create Key Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Key(name: string, args: KeyArgs, opts?: CustomResourceOptions);@overload
def Key(resource_name: str,
args: KeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Key(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_opts: Optional[Sequence[str]] = None,
key_type: Optional[str] = None,
key_vault_id: Optional[str] = None,
curve: Optional[str] = None,
expiration_date: Optional[str] = None,
key_size: Optional[int] = None,
name: Optional[str] = None,
not_before_date: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewKey(ctx *Context, name string, args KeyArgs, opts ...ResourceOption) (*Key, error)public Key(string name, KeyArgs args, CustomResourceOptions? opts = null)type: azure:keyvault:Key
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 KeyArgs
- 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 KeyArgs
- 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 KeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyArgs
- 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 keyResource = new Azure.KeyVault.Key("keyResource", new()
{
KeyOpts = new[]
{
"string",
},
KeyType = "string",
KeyVaultId = "string",
Curve = "string",
ExpirationDate = "string",
KeySize = 0,
Name = "string",
NotBeforeDate = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := keyvault.NewKey(ctx, "keyResource", &keyvault.KeyArgs{
KeyOpts: pulumi.StringArray{
pulumi.String("string"),
},
KeyType: pulumi.String("string"),
KeyVaultId: pulumi.String("string"),
Curve: pulumi.String("string"),
ExpirationDate: pulumi.String("string"),
KeySize: pulumi.Int(0),
Name: pulumi.String("string"),
NotBeforeDate: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var keyResource = new Key("keyResource", KeyArgs.builder()
.keyOpts("string")
.keyType("string")
.keyVaultId("string")
.curve("string")
.expirationDate("string")
.keySize(0)
.name("string")
.notBeforeDate("string")
.tags(Map.of("string", "string"))
.build());
key_resource = azure.keyvault.Key("keyResource",
key_opts=["string"],
key_type="string",
key_vault_id="string",
curve="string",
expiration_date="string",
key_size=0,
name="string",
not_before_date="string",
tags={
"string": "string",
})
const keyResource = new azure.keyvault.Key("keyResource", {
keyOpts: ["string"],
keyType: "string",
keyVaultId: "string",
curve: "string",
expirationDate: "string",
keySize: 0,
name: "string",
notBeforeDate: "string",
tags: {
string: "string",
},
});
type: azure:keyvault:Key
properties:
curve: string
expirationDate: string
keyOpts:
- string
keySize: 0
keyType: string
keyVaultId: string
name: string
notBeforeDate: string
tags:
string: string
Key Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Key resource accepts the following input properties:
- Key
Opts List<string> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - Key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - Key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- Curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - Expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- Key
Size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - Name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Key
Opts []string - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - Key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - Key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- Curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - Expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- Key
Size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - Name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- map[string]string
- A mapping of tags to assign to the resource.
- key
Opts List<String> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Type String - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault StringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve String
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - expiration
Date String - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Size Integer - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - name String
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before StringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Map<String,String>
- A mapping of tags to assign to the resource.
- key
Opts string[] - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Size number - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- key_
opts Sequence[str] - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key_
type str - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key_
vault_ strid - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve str
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - expiration_
date str - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key_
size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - name str
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not_
before_ strdate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- key
Opts List<String> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Type String - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault StringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve String
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - expiration
Date String - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Size Number - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - name String
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before StringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:
- E string
- The RSA public exponent of this Key Vault Key.
- Id string
- The provider-assigned unique ID for this managed resource.
- N string
- The RSA modulus of this Key Vault Key.
- Public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- Public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- Version string
- The current version of the Key Vault Key.
- Versionless
Id string - The Base ID of the Key Vault Key.
- X string
- The EC X component of this Key Vault Key.
- Y string
- The EC Y component of this Key Vault Key.
- E string
- The RSA public exponent of this Key Vault Key.
- Id string
- The provider-assigned unique ID for this managed resource.
- N string
- The RSA modulus of this Key Vault Key.
- Public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- Public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- Version string
- The current version of the Key Vault Key.
- Versionless
Id string - The Base ID of the Key Vault Key.
- X string
- The EC X component of this Key Vault Key.
- Y string
- The EC Y component of this Key Vault Key.
- e String
- The RSA public exponent of this Key Vault Key.
- id String
- The provider-assigned unique ID for this managed resource.
- n String
- The RSA modulus of this Key Vault Key.
- public
Key StringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key StringPem - The PEM encoded public key of this Key Vault Key.
- version String
- The current version of the Key Vault Key.
- versionless
Id String - The Base ID of the Key Vault Key.
- x String
- The EC X component of this Key Vault Key.
- y String
- The EC Y component of this Key Vault Key.
- e string
- The RSA public exponent of this Key Vault Key.
- id string
- The provider-assigned unique ID for this managed resource.
- n string
- The RSA modulus of this Key Vault Key.
- public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- version string
- The current version of the Key Vault Key.
- versionless
Id string - The Base ID of the Key Vault Key.
- x string
- The EC X component of this Key Vault Key.
- y string
- The EC Y component of this Key Vault Key.
- e str
- The RSA public exponent of this Key Vault Key.
- id str
- The provider-assigned unique ID for this managed resource.
- n str
- The RSA modulus of this Key Vault Key.
- public_
key_ stropenssh - The OpenSSH encoded public key of this Key Vault Key.
- public_
key_ strpem - The PEM encoded public key of this Key Vault Key.
- version str
- The current version of the Key Vault Key.
- versionless_
id str - The Base ID of the Key Vault Key.
- x str
- The EC X component of this Key Vault Key.
- y str
- The EC Y component of this Key Vault Key.
- e String
- The RSA public exponent of this Key Vault Key.
- id String
- The provider-assigned unique ID for this managed resource.
- n String
- The RSA modulus of this Key Vault Key.
- public
Key StringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key StringPem - The PEM encoded public key of this Key Vault Key.
- version String
- The current version of the Key Vault Key.
- versionless
Id String - The Base ID of the Key Vault Key.
- x String
- The EC X component of this Key Vault Key.
- y String
- The EC Y component of this Key Vault Key.
Look up Existing Key Resource
Get an existing Key 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?: KeyState, opts?: CustomResourceOptions): Key@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
curve: Optional[str] = None,
e: Optional[str] = None,
expiration_date: Optional[str] = None,
key_opts: Optional[Sequence[str]] = None,
key_size: Optional[int] = None,
key_type: Optional[str] = None,
key_vault_id: Optional[str] = None,
n: Optional[str] = None,
name: Optional[str] = None,
not_before_date: Optional[str] = None,
public_key_openssh: Optional[str] = None,
public_key_pem: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
version: Optional[str] = None,
versionless_id: Optional[str] = None,
x: Optional[str] = None,
y: Optional[str] = None) -> Keyfunc GetKey(ctx *Context, name string, id IDInput, state *KeyState, opts ...ResourceOption) (*Key, error)public static Key Get(string name, Input<string> id, KeyState? state, CustomResourceOptions? opts = null)public static Key get(String name, Output<String> id, KeyState state, CustomResourceOptions options)resources: _: type: azure:keyvault:Key get: id: ${id}- 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.
- Curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - E string
- The RSA public exponent of this Key Vault Key.
- Expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- Key
Opts List<string> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - Key
Size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - Key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - Key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- N string
- The RSA modulus of this Key Vault Key.
- Name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- Public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Version string
- The current version of the Key Vault Key.
- Versionless
Id string - The Base ID of the Key Vault Key.
- X string
- The EC X component of this Key Vault Key.
- Y string
- The EC Y component of this Key Vault Key.
- Curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - E string
- The RSA public exponent of this Key Vault Key.
- Expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- Key
Opts []string - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - Key
Size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - Key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - Key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- N string
- The RSA modulus of this Key Vault Key.
- Name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- Public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- Public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- map[string]string
- A mapping of tags to assign to the resource.
- Version string
- The current version of the Key Vault Key.
- Versionless
Id string - The Base ID of the Key Vault Key.
- X string
- The EC X component of this Key Vault Key.
- Y string
- The EC Y component of this Key Vault Key.
- curve String
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - e String
- The RSA public exponent of this Key Vault Key.
- expiration
Date String - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Opts List<String> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Size Integer - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - key
Type String - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault StringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n String
- The RSA modulus of this Key Vault Key.
- name String
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before StringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- public
Key StringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key StringPem - The PEM encoded public key of this Key Vault Key.
- Map<String,String>
- A mapping of tags to assign to the resource.
- version String
- The current version of the Key Vault Key.
- versionless
Id String - The Base ID of the Key Vault Key.
- x String
- The EC X component of this Key Vault Key.
- y String
- The EC Y component of this Key Vault Key.
- curve string
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - e string
- The RSA public exponent of this Key Vault Key.
- expiration
Date string - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Opts string[] - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Size number - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - key
Type string - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault stringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n string
- The RSA modulus of this Key Vault Key.
- name string
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before stringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- public
Key stringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key stringPem - The PEM encoded public key of this Key Vault Key.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- version string
- The current version of the Key Vault Key.
- versionless
Id string - The Base ID of the Key Vault Key.
- x string
- The EC X component of this Key Vault Key.
- y string
- The EC Y component of this Key Vault Key.
- curve str
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - e str
- The RSA public exponent of this Key Vault Key.
- expiration_
date str - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key_
opts Sequence[str] - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key_
size int - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - key_
type str - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key_
vault_ strid - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n str
- The RSA modulus of this Key Vault Key.
- name str
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not_
before_ strdate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- public_
key_ stropenssh - The OpenSSH encoded public key of this Key Vault Key.
- public_
key_ strpem - The PEM encoded public key of this Key Vault Key.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- version str
- The current version of the Key Vault Key.
- versionless_
id str - The Base ID of the Key Vault Key.
- x str
- The EC X component of this Key Vault Key.
- y str
- The EC Y component of this Key Vault Key.
- curve String
- Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-256K,P-384, andP-521. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created. - e String
- The RSA public exponent of this Key Vault Key.
- expiration
Date String - Expiration UTC datetime (Y-m-d'T'H:M:S'Z').
- key
Opts List<String> - A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive. - key
Size Number - Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created. - key
Type String - Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created. - key
Vault StringId - The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n String
- The RSA modulus of this Key Vault Key.
- name String
- Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before StringDate - Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').
- public
Key StringOpenssh - The OpenSSH encoded public key of this Key Vault Key.
- public
Key StringPem - The PEM encoded public key of this Key Vault Key.
- Map<String>
- A mapping of tags to assign to the resource.
- version String
- The current version of the Key Vault Key.
- versionless
Id String - The Base ID of the Key Vault Key.
- x String
- The EC X component of this Key Vault Key.
- y String
- The EC Y component of this Key Vault Key.
Import
Key Vault Key which is Enabled can be imported using the resource id, e.g.
$ pulumi import azure:keyvault/key:Key example "https://example-keyvault.vault.azure.net/keys/example/fdf067c93bbb4b22bff4d8b7a9a56217"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
