Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for getting keys from a Managed HSM Key Vault #27747

Open
1 task done
cvriel opened this issue Oct 24, 2024 · 0 comments
Open
1 task done

Support for getting keys from a Managed HSM Key Vault #27747

cvriel opened this issue Oct 24, 2024 · 0 comments

Comments

@cvriel
Copy link

cvriel commented Oct 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

There is no data resource for getting a KEY instance from a Azure HSM keyvault.

For a regular (non HSM) keyvault there is a data source for getting a key:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_key

And there is a data source for getting a HSM keyvault instance itself (but not for getting keys):
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_managed_hardware_security_module

New or Affected Resource(s)/Data Source(s)

azurerm_key_vault_managed_hardware_security_module_key

Potential Terraform Configuration

data "azurerm_key_vault_managed_hardware_security_module" "existing" {
  name                = "mykeyvaultHsm"
  resource_group_name = "some-resource-group"
}

data "azurerm_key_vault_managed_hardware_security_module_key" "example" {
  name         = "secret-sauce"
  key_vault_id = data.azurerm_key_vault_managed_hardware_security_module.existing.id
}

output "key_version" {
  value = data.azurerm_key_vault_managed_hardware_security_module_key.example.version
}

References

Similar issues have already been raised:
#25801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants