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

feat: Added AZ recommendation for Cosmos DB #417

Merged
merged 6 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Azure Resource Graph Query
// Query to find Azure Cosmos DB accounts that do not utilize availability zones and are deployed in availability-zone supported regions
Resources
| where type == "microsoft.documentdb/databaseaccounts"
| where properties.capabilities !has_cs 'EnableServerless'
| project recommendationId='921631f6-ed59-49a5-94c1-f0f3ececa580', name, id, tags, locations=properties.locations
| mv-expand locations
| where not(locations.isZoneRedundant) //filter out already AZ enabled regions
| extend location=tostring(locations.locationName)
| project-away locations
| where location in (
'Australia East', 'Brazil South', 'Canada Central', 'Central India', 'Central US',
'China North 3', 'East Asia', 'East US', 'East US 2', 'France Central',
'Germany West Central', 'Israel Central', 'Italy North', 'Japan East', 'Japan West',
'Korea Central', 'Mexico Central', 'New Zealand North', 'North Europe', 'Norway East',
'Poland Central', 'Qatar Central', 'South Africa North', 'South Central US', 'Southeast Asia',
'Spain Central', 'Sweden Central', 'Switzerland North', 'UAE North', 'UK South',
'US Gov Virginia', 'West Europe', 'West US 2', 'West US 3') // filter out regions unsupported for AZs
| project-rename param1=location
Original file line number Diff line number Diff line change
@@ -36,6 +36,24 @@
- name: Manage an Azure Cosmos DB account by using the Azure portal
url: "https://learn.microsoft.com/azure/cosmos-db/how-to-manage-database-account#automatic-failover"

- description: Enable availability zones
aprlGuid: 921631f6-ed59-49a5-94c1-f0f3ececa580
recommendationTypeId: null
recommendationControl: High Availability
recommendationImpact: High
recommendationResourceType: Microsoft.DocumentDB/databaseAccounts
recommendationMetadataState: Active
longDescription: |
When availability zones are configured, Azure Cosmos DB intelligently distributes the 4 replicas of your data across all available zones. It ensures that your Azure Cosmos DB can withstand an outage in one availability zone and remain fully operational throughout.
potentialBenefits: Enhances high availability
pgVerified: false
publishedToLearn: false
automationAvailable: true
tags: null
learnMoreLink:
- name: High availability in Azure Cosmos DB
url: "https://learn.microsoft.com/en-us/azure/reliability/reliability-cosmos-db-nosql"

- description: Evaluate multi-region write capability
aprlGuid: 9ce78192-74a0-104c-b5bb-9a443f941649
recommendationTypeId: null