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 loginpowerpipe 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 subscriptionfrom azure_cosmosdb_account as a, azure_subscription as subwhere sub.subscription_id = a.subscription_id;