Table: azure_keyvault_keyvault_managed_hsms

This table shows data for Azure Key Vault Key Vault Managed Hsms.

https://learn.microsoft.com/en-us/rest/api/keyvault/managedhsm/managed-hsms/list-by-subscription?tabs=HTTP#managedhsm (opens in a new tab)

The primary key for this table is id.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
subscription_idutf8
locationutf8
propertiesjson
skujson
tagsjson
id (PK)utf8
nameutf8
system_datajson
typeutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

Azure Key Vault Managed HSM should have purge protection enabled

SELECT
  'Azure Key Vault Managed HSM should have purge protection enabled' AS title,
  subscription_id AS subscription_id,
  id AS resource_id,
  CASE
  WHEN (properties->>'enablePurgeProtection')::BOOL IS NOT true
  OR (properties->>'enableSoftDelete')::BOOL IS NOT true
  THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  azure_keyvault_keyvault_managed_hsms;