Skip to content

data-platform-hq/terraform-azurerm-key-vault-key

Repository files navigation

Azure Key Vault Key Terraform module

Terraform module for creation Azure Key Vault Key

Usage

data "azurerm_key_vault" "example" {
  name                = "example"
  resource_group_name = "example"
}

module "key_vault_keys" {
  source   = "data-platform-hq/key-vault-key/azurerm"
  version  = "~> 1.0"

  project                = "datahq"
  env                    = "example"
  location               = "eastus"
  prefix                 = "cmk"
  key_vault_id           = data.azurerm_key_vault.example.id
}

Requirements

Name Version
terraform >=1.3
azurerm >= 4.0.1

Providers

Name Version
azurerm >= 4.0.1

Modules

No modules.

Resources

Name Type
azurerm_key_vault_key.this resource

Inputs

Name Description Type Default Required
custom_key_name Specifies the custom name of the Key Vault Key string null no
custom_rotation_policy Map with parameters to configure Key rotation policy
object({
time_before_expiry = optional(string, "P10D")
expire_after = optional(string, "P90D")
notify_before_expiry = optional(string, "P15D")
})
n/a yes
default_expiration_date Expiration UTC datetime (Y-m-d'T'H:M:S'Z') string null no
env Environment name string n/a yes
key_opts JSON web key operations: (decrypt,encrypt,sign,unwrapKey,verify,wrapKey) list(string)
[
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey"
]
no
key_size Size of the RSA key to create in bytes, required for RSA & RSA-HSM: (1024 - 2048) number 2048 no
key_type Key Type to use for this Key Vault Key: (EC,EC-HSM,RSA,RSA-HSM) string "RSA" no
key_vault_id Key Vault ID string n/a yes
location Specifies the supported Azure location where the resource exists string n/a yes
prefix Specifies the prefix of the Key Vault Key string "" no
project Project name string n/a yes

Outputs

Name Description
key_id The Key Vault Key ID
key_name The Key Vault Key name

License

Apache 2 Licensed. For more information please see LICENSE

Packages

No packages published

Contributors 6

Languages