turbot/steampipe-mod-azure-compliance

Control: Cosmos DB accounts should disable key based metadata write access

Description

Ensure Cosmos DB accounts have key-based metadata write_access disabled. This control is non-compliant if Cosmos DB accounts have key-based metadata write access enabled.

Usage

Run the control in your terminal:

powerpipe control run azure_compliance.control.cosmosdb_account_key_based_metadata_write_access_disabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run azure_compliance.control.cosmosdb_account_key_based_metadata_write_access_disabled --share

SQL

This control uses a named query:

select
a.id as resource,
case
when disable_key_based_metadata_write_access then 'ok'
else 'alarm'
end as status,
case
when disable_key_based_metadata_write_access then a.name || ' key based metadata write_access disabled.'
else a.name || ' key based metadata write_access enabled.'
end as reason
, a.resource_group as resource_group
, sub.display_name as subscription
from
azure_cosmosdb_account as a,
azure_subscription as sub
where
sub.subscription_id = a.subscription_id;

Tags