1. Packages
  2. Azure Classic
  3. API Docs
  4. keyvault
  5. Key

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.keyvault.Key

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Key Vault Key.

    Example Usage

    Note: To use this resource, your client should have RBAC roles with permissions like Key Vault Crypto Officer or Key Vault Administrator or an assigned Key Vault Access Policy with permissions Create,Delete,Get,Purge,Recover,Update and GetRotationPolicy for keys without Rotation Policy. Include SetRotationPolicy for keys with Rotation Policy.

    Note: The Azure Provider includes a Feature Toggle which will purge a Key Vault Key resource on destroy, rather than the default soft-delete. See purge_soft_deleted_keys_on_destroy for more information.

    Additional Examples

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const current = azure.core.getClientConfig({});
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleKeyVault = new azure.keyvault.KeyVault("example", {
        name: "examplekeyvault",
        location: example.location,
        resourceGroupName: example.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",
                "Delete",
                "Get",
                "Purge",
                "Recover",
                "Update",
                "GetRotationPolicy",
                "SetRotationPolicy",
            ],
            secretPermissions: ["Set"],
        }],
    });
    const generated = new azure.keyvault.Key("generated", {
        name: "generated-certificate",
        keyVaultId: exampleKeyVault.id,
        keyType: "RSA",
        keySize: 2048,
        keyOpts: [
            "decrypt",
            "encrypt",
            "sign",
            "unwrapKey",
            "verify",
            "wrapKey",
        ],
        rotationPolicy: {
            automatic: {
                timeBeforeExpiry: "P30D",
            },
            expireAfter: "P90D",
            notifyBeforeExpiry: "P29D",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_key_vault = azure.keyvault.KeyVault("example",
        name="examplekeyvault",
        location=example.location,
        resource_group_name=example.name,
        tenant_id=current.tenant_id,
        sku_name="premium",
        soft_delete_retention_days=7,
        access_policies=[{
            "tenant_id": current.tenant_id,
            "object_id": current.object_id,
            "key_permissions": [
                "Create",
                "Delete",
                "Get",
                "Purge",
                "Recover",
                "Update",
                "GetRotationPolicy",
                "SetRotationPolicy",
            ],
            "secret_permissions": ["Set"],
        }])
    generated = azure.keyvault.Key("generated",
        name="generated-certificate",
        key_vault_id=example_key_vault.id,
        key_type="RSA",
        key_size=2048,
        key_opts=[
            "decrypt",
            "encrypt",
            "sign",
            "unwrapKey",
            "verify",
            "wrapKey",
        ],
        rotation_policy={
            "automatic": {
                "time_before_expiry": "P30D",
            },
            "expire_after": "P90D",
            "notify_before_expiry": "P29D",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/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, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
    			Name:                    pulumi.String("examplekeyvault"),
    			Location:                example.Location,
    			ResourceGroupName:       example.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("Delete"),
    						pulumi.String("Get"),
    						pulumi.String("Purge"),
    						pulumi.String("Recover"),
    						pulumi.String("Update"),
    						pulumi.String("GetRotationPolicy"),
    						pulumi.String("SetRotationPolicy"),
    					},
    					SecretPermissions: pulumi.StringArray{
    						pulumi.String("Set"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = keyvault.NewKey(ctx, "generated", &keyvault.KeyArgs{
    			Name:       pulumi.String("generated-certificate"),
    			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"),
    			},
    			RotationPolicy: &keyvault.KeyRotationPolicyArgs{
    				Automatic: &keyvault.KeyRotationPolicyAutomaticArgs{
    					TimeBeforeExpiry: pulumi.String("P30D"),
    				},
    				ExpireAfter:        pulumi.String("P90D"),
    				NotifyBeforeExpiry: pulumi.String("P29D"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Azure.Core.GetClientConfig.Invoke();
    
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
        {
            Name = "examplekeyvault",
            Location = example.Location,
            ResourceGroupName = example.Name,
            TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
            SkuName = "premium",
            SoftDeleteRetentionDays = 7,
            AccessPolicies = new[]
            {
                new Azure.KeyVault.Inputs.KeyVaultAccessPolicyArgs
                {
                    TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
                    ObjectId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
                    KeyPermissions = new[]
                    {
                        "Create",
                        "Delete",
                        "Get",
                        "Purge",
                        "Recover",
                        "Update",
                        "GetRotationPolicy",
                        "SetRotationPolicy",
                    },
                    SecretPermissions = new[]
                    {
                        "Set",
                    },
                },
            },
        });
    
        var generated = new Azure.KeyVault.Key("generated", new()
        {
            Name = "generated-certificate",
            KeyVaultId = exampleKeyVault.Id,
            KeyType = "RSA",
            KeySize = 2048,
            KeyOpts = new[]
            {
                "decrypt",
                "encrypt",
                "sign",
                "unwrapKey",
                "verify",
                "wrapKey",
            },
            RotationPolicy = new Azure.KeyVault.Inputs.KeyRotationPolicyArgs
            {
                Automatic = new Azure.KeyVault.Inputs.KeyRotationPolicyAutomaticArgs
                {
                    TimeBeforeExpiry = "P30D",
                },
                ExpireAfter = "P90D",
                NotifyBeforeExpiry = "P29D",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.keyvault.KeyVault;
    import com.pulumi.azure.keyvault.KeyVaultArgs;
    import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;
    import com.pulumi.azure.keyvault.Key;
    import com.pulumi.azure.keyvault.KeyArgs;
    import com.pulumi.azure.keyvault.inputs.KeyRotationPolicyArgs;
    import com.pulumi.azure.keyvault.inputs.KeyRotationPolicyAutomaticArgs;
    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) {
            final var current = CoreFunctions.getClientConfig();
    
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
                .name("examplekeyvault")
                .location(example.location())
                .resourceGroupName(example.name())
                .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .skuName("premium")
                .softDeleteRetentionDays(7)
                .accessPolicies(KeyVaultAccessPolicyArgs.builder()
                    .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                    .objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
                    .keyPermissions(                
                        "Create",
                        "Delete",
                        "Get",
                        "Purge",
                        "Recover",
                        "Update",
                        "GetRotationPolicy",
                        "SetRotationPolicy")
                    .secretPermissions("Set")
                    .build())
                .build());
    
            var generated = new Key("generated", KeyArgs.builder()
                .name("generated-certificate")
                .keyVaultId(exampleKeyVault.id())
                .keyType("RSA")
                .keySize(2048)
                .keyOpts(            
                    "decrypt",
                    "encrypt",
                    "sign",
                    "unwrapKey",
                    "verify",
                    "wrapKey")
                .rotationPolicy(KeyRotationPolicyArgs.builder()
                    .automatic(KeyRotationPolicyAutomaticArgs.builder()
                        .timeBeforeExpiry("P30D")
                        .build())
                    .expireAfter("P90D")
                    .notifyBeforeExpiry("P29D")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleKeyVault:
        type: azure:keyvault:KeyVault
        name: example
        properties:
          name: examplekeyvault
          location: ${example.location}
          resourceGroupName: ${example.name}
          tenantId: ${current.tenantId}
          skuName: premium
          softDeleteRetentionDays: 7
          accessPolicies:
            - tenantId: ${current.tenantId}
              objectId: ${current.objectId}
              keyPermissions:
                - Create
                - Delete
                - Get
                - Purge
                - Recover
                - Update
                - GetRotationPolicy
                - SetRotationPolicy
              secretPermissions:
                - Set
      generated:
        type: azure:keyvault:Key
        properties:
          name: generated-certificate
          keyVaultId: ${exampleKeyVault.id}
          keyType: RSA
          keySize: 2048
          keyOpts:
            - decrypt
            - encrypt
            - sign
            - unwrapKey
            - verify
            - wrapKey
          rotationPolicy:
            automatic:
              timeBeforeExpiry: P30D
            expireAfter: P90D
            notifyBeforeExpiry: P29D
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
    

    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,
            rotation_policy: Optional[KeyRotationPolicyArgs] = 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)
    public Key(String name, KeyArgs args)
    public Key(String name, KeyArgs args, CustomResourceOptions options)
    
    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",
        RotationPolicy = new Azure.KeyVault.Inputs.KeyRotationPolicyArgs
        {
            Automatic = new Azure.KeyVault.Inputs.KeyRotationPolicyAutomaticArgs
            {
                TimeAfterCreation = "string",
                TimeBeforeExpiry = "string",
            },
            ExpireAfter = "string",
            NotifyBeforeExpiry = "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"),
    	RotationPolicy: &keyvault.KeyRotationPolicyArgs{
    		Automatic: &keyvault.KeyRotationPolicyAutomaticArgs{
    			TimeAfterCreation: pulumi.String("string"),
    			TimeBeforeExpiry:  pulumi.String("string"),
    		},
    		ExpireAfter:        pulumi.String("string"),
    		NotifyBeforeExpiry: 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")
        .rotationPolicy(KeyRotationPolicyArgs.builder()
            .automatic(KeyRotationPolicyAutomaticArgs.builder()
                .timeAfterCreation("string")
                .timeBeforeExpiry("string")
                .build())
            .expireAfter("string")
            .notifyBeforeExpiry("string")
            .build())
        .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",
        rotation_policy={
            "automatic": {
                "time_after_creation": "string",
                "time_before_expiry": "string",
            },
            "expire_after": "string",
            "notify_before_expiry": "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",
        rotationPolicy: {
            automatic: {
                timeAfterCreation: "string",
                timeBeforeExpiry: "string",
            },
            expireAfter: "string",
            notifyBeforeExpiry: "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
        rotationPolicy:
            automatic:
                timeAfterCreation: string
                timeBeforeExpiry: string
            expireAfter: string
            notifyBeforeExpiry: 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:

    KeyOpts List<string>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    KeyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    KeyVaultId string
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    ExpirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    KeySize int
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-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.
    NotBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    RotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    KeyOpts []string
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    KeyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    KeyVaultId string
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    ExpirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    KeySize int
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-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.
    NotBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    RotationPolicy KeyRotationPolicyArgs
    A rotation_policy block as defined below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    keyOpts List<String>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keyType String
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId String
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    expirationDate String

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keySize Integer
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-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.
    notBeforeDate String

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    rotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    keyOpts string[]
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId string
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    expirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keySize number
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-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.
    notBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    rotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    tags {[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, verify and wrapKey. 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, RSA and RSA-HSM. Changing this forces a new resource to be created.
    key_vault_id str
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if 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').

    Note: Removing this field from the config forces a new resource to be created.

    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_type is RSA or RSA-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_date str

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    rotation_policy KeyRotationPolicyArgs
    A rotation_policy block as defined below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    keyOpts List<String>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keyType String
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId String
    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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    expirationDate String

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keySize Number
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-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.
    notBeforeDate String

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    rotationPolicy Property Map
    A rotation_policy block as defined below.
    tags 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.
    PublicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    PublicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    ResourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    ResourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    Version string
    The current version of the Key Vault Key.
    VersionlessId 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.
    PublicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    PublicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    ResourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    ResourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    Version string
    The current version of the Key Vault Key.
    VersionlessId 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.
    publicKeyOpenssh String
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem String
    The PEM encoded public key of this Key Vault Key.
    resourceId String
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId String
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    version String
    The current version of the Key Vault Key.
    versionlessId 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.
    publicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    resourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    version string
    The current version of the Key Vault Key.
    versionlessId 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_openssh str
    The OpenSSH encoded public key of this Key Vault Key.
    public_key_pem str
    The PEM encoded public key of this Key Vault Key.
    resource_id str
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resource_versionless_id str
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    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.
    publicKeyOpenssh String
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem String
    The PEM encoded public key of this Key Vault Key.
    resourceId String
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId String
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    version String
    The current version of the Key Vault Key.
    versionlessId 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,
            resource_id: Optional[str] = None,
            resource_versionless_id: Optional[str] = None,
            rotation_policy: Optional[KeyRotationPolicyArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            version: Optional[str] = None,
            versionless_id: Optional[str] = None,
            x: Optional[str] = None,
            y: Optional[str] = None) -> Key
    func 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)
    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.
    The following state arguments are supported:
    Curve string
    Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    E string
    The RSA public exponent of this Key Vault Key.
    ExpirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    KeyOpts List<string>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    KeySize int
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created.
    KeyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    KeyVaultId string
    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.
    NotBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    PublicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    PublicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    ResourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    ResourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    RotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Version string
    The current version of the Key Vault Key.
    VersionlessId 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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    E string
    The RSA public exponent of this Key Vault Key.
    ExpirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    KeyOpts []string
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    KeySize int
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created.
    KeyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    KeyVaultId string
    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.
    NotBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    PublicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    PublicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    ResourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    ResourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    RotationPolicy KeyRotationPolicyArgs
    A rotation_policy block as defined below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Version string
    The current version of the Key Vault Key.
    VersionlessId 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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    e String
    The RSA public exponent of this Key Vault Key.
    expirationDate String

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keyOpts List<String>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keySize Integer
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created.
    keyType String
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId String
    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.
    notBeforeDate String

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    publicKeyOpenssh String
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem String
    The PEM encoded public key of this Key Vault Key.
    resourceId String
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId String
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    rotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    version String
    The current version of the Key Vault Key.
    versionlessId 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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    e string
    The RSA public exponent of this Key Vault Key.
    expirationDate string

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keyOpts string[]
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keySize number
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created.
    keyType string
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId string
    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.
    notBeforeDate string

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    publicKeyOpenssh string
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem string
    The PEM encoded public key of this Key Vault Key.
    resourceId string
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId string
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    rotationPolicy KeyRotationPolicy
    A rotation_policy block as defined below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    version string
    The current version of the Key Vault Key.
    versionlessId 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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if 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').

    Note: Removing this field from the config forces a new resource to be created.

    key_opts Sequence[str]
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. 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_type is RSA or RSA-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, RSA and RSA-HSM. Changing this forces a new resource to be created.
    key_vault_id str
    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_date str

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    public_key_openssh str
    The OpenSSH encoded public key of this Key Vault Key.
    public_key_pem str
    The PEM encoded public key of this Key Vault Key.
    resource_id str
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resource_versionless_id str
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    rotation_policy KeyRotationPolicyArgs
    A rotation_policy block as defined below.
    tags 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 EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created.
    e String
    The RSA public exponent of this Key Vault Key.
    expirationDate String

    Expiration UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Removing this field from the config forces a new resource to be created.

    keyOpts List<String>
    A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive.
    keySize Number
    Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created.
    keyType String
    Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created.
    keyVaultId String
    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.
    notBeforeDate String

    Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z').

    Note: Once expiration_date is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key.

    publicKeyOpenssh String
    The OpenSSH encoded public key of this Key Vault Key.
    publicKeyPem String
    The PEM encoded public key of this Key Vault Key.
    resourceId String
    The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services.
    resourceVersionlessId String
    The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated.
    rotationPolicy Property Map
    A rotation_policy block as defined below.
    tags Map<String>
    A mapping of tags to assign to the resource.
    version String
    The current version of the Key Vault Key.
    versionlessId 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.

    Supporting Types

    KeyRotationPolicy, KeyRotationPolicyArgs

    Automatic KeyRotationPolicyAutomatic
    An automatic block as defined below.
    ExpireAfter string
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    NotifyBeforeExpiry string
    Notify at a given duration before expiry as an ISO 8601 duration.
    Automatic KeyRotationPolicyAutomatic
    An automatic block as defined below.
    ExpireAfter string
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    NotifyBeforeExpiry string
    Notify at a given duration before expiry as an ISO 8601 duration.
    automatic KeyRotationPolicyAutomatic
    An automatic block as defined below.
    expireAfter String
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    notifyBeforeExpiry String
    Notify at a given duration before expiry as an ISO 8601 duration.
    automatic KeyRotationPolicyAutomatic
    An automatic block as defined below.
    expireAfter string
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    notifyBeforeExpiry string
    Notify at a given duration before expiry as an ISO 8601 duration.
    automatic KeyRotationPolicyAutomatic
    An automatic block as defined below.
    expire_after str
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    notify_before_expiry str
    Notify at a given duration before expiry as an ISO 8601 duration.
    automatic Property Map
    An automatic block as defined below.
    expireAfter String
    Expire a Key Vault Key after given duration as an ISO 8601 duration.
    notifyBeforeExpiry String
    Notify at a given duration before expiry as an ISO 8601 duration.

    KeyRotationPolicyAutomatic, KeyRotationPolicyAutomaticArgs

    TimeAfterCreation string
    Rotate automatically at a duration after create as an ISO 8601 duration.
    TimeBeforeExpiry string
    Rotate automatically at a duration before expiry as an ISO 8601 duration.
    TimeAfterCreation string
    Rotate automatically at a duration after create as an ISO 8601 duration.
    TimeBeforeExpiry string
    Rotate automatically at a duration before expiry as an ISO 8601 duration.
    timeAfterCreation String
    Rotate automatically at a duration after create as an ISO 8601 duration.
    timeBeforeExpiry String
    Rotate automatically at a duration before expiry as an ISO 8601 duration.
    timeAfterCreation string
    Rotate automatically at a duration after create as an ISO 8601 duration.
    timeBeforeExpiry string
    Rotate automatically at a duration before expiry as an ISO 8601 duration.
    time_after_creation str
    Rotate automatically at a duration after create as an ISO 8601 duration.
    time_before_expiry str
    Rotate automatically at a duration before expiry as an ISO 8601 duration.
    timeAfterCreation String
    Rotate automatically at a duration after create as an ISO 8601 duration.
    timeBeforeExpiry String
    Rotate automatically at a duration before expiry as an ISO 8601 duration.

    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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi