vault_pki_secret_backend_key

Creates a key on a PKI Secret Backend for Vault.

Example Usage

resource "vault_mount" "pki" {
  path                      = "pki"
  type                      = "pki"
  default_lease_ttl_seconds = 3600
  max_lease_ttl_seconds     = 86400
}

resource "vault_pki_secret_backend_key" "key" {
  mount    = vault_mount.pki.path
  type     = "exported"
  key_name = "example-key"
  key_type = "rsa"
  key_bits = "2048"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

PKI secret backend key can be imported using the id, e.g.

$ terraform import vault_pki_secret_backend_key.key pki/key/bf9b0d48-d0dd-652c-30be-77d04fc7e94d