flexibleServers
Summary
Details
Enable HA with zone redundancy
Impact: High Category: High Availability
APRL GUID: ca87914f-aac4-4783-ab67-82a6f936f194
Description:
Enable HA with zone redundancy on flexible server instances to deploy a standby replica in a different zone, offering automatic failover capability for improved reliability and disaster recovery.
Potential Benefits:
Enhanced uptime and data protection
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that are not zone redundant
resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| where location in~ ("australiaeast", "brazilsouth", "canadacentral", "centralindia", "centralus", "eastasia", "eastus", "eastus2", "francecentral", "germanywestcentral", "israelcentral", "italynorth", "japaneast", "japanwest", "koreacentral", "mexicocentral", "newzealandnorth", "northeurope", "norwayeast", "polandcentral", "qatarcentral", "southafricanorth", "southcentralus", "southeastasia", "spaincentral", "swedencentral", "switzerlandnorth", "uaenorth", "uksouth", "westeurope", "westus2", "westus3", "usgovvirginia", "chinanorth3")
| where properties.highAvailability.mode != "ZoneRedundant"
| project recommendationId = "ca87914f-aac4-4783-ab67-82a6f936f194", name, id, tags, param1 = "ZoneRedundant: False"
Enable custom maintenance schedule
Impact: High Category: Scalability
APRL GUID: b2bad57d-7e03-4c0f-9024-597c9eb295bb
Description:
Use custom maintenance schedule on flexible server instances to select a preferred time for service updates to be applied.
Potential Benefits:
Control update timings
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that do not have a custom maintenance window
resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| where properties.maintenanceWindow.customWindow != "Enabled"
| project recommendationId = "b2bad57d-7e03-4c0f-9024-597c9eb295bb", name, id, tags, param1 = strcat("customWindow:", properties['maintenanceWindow']['customWindow'])
Configure geo redundant backup storage
Impact: High Category: Disaster Recovery
APRL GUID: 31f4ac4b-29cb-4588-8de2-d8fe6f13ceb3
Description:
Configure GRS to ensure that your database meets its availability and durability targets even in the face of failures or disasters.
Potential Benefits:
Recover from regional failure and/or disaster
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that do not have geo redundant backup storage configured
resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| where properties.backup.geoRedundantBackup != "Enabled"
| project recommendationId = "31f4ac4b-29cb-4588-8de2-d8fe6f13ceb3", name, id, tags, param1 = strcat("geoRedundantBackup:", properties['backup']['geoRedundantBackup'])
Configure one or more read replicas
Impact: High Category: Disaster Recovery
APRL GUID: 2ab85a67-26be-4ed2-a0bb-101b2513ec63
Description:
Configure one or more read replicas to ensure that your database meets its availability and durability targets even in the face of failures or disasters.
Potential Benefits:
Recover from regional failure and/or disaster
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that do not have read replicas
resources
| where type == "microsoft.dbforpostgresql/flexibleservers" and properties.replicationRole == "AsyncReplica"
| project replicaServerId = id, id = tostring(properties.sourceServerResourceId)
| join kind=fullouter (resources | where type == "microsoft.dbforpostgresql/flexibleservers" and properties.replicationRole != "AsyncReplica") on id
| where isempty(replicaServerId)
| project recommendationId = "2ab85a67-26be-4ed2-a0bb-101b2513ec63", name, id = id1, tags, param1 = strcat("replicationRole:", properties['replicationRole'])
Configure storage auto-grow
Impact: High Category: Scalability
APRL GUID: 6293a3cc-6b4a-4c0f-9ea7-b8ae8d7dd3d5
Description:
Configure storage auto-grow to prevent the server from running out of storage and becoming read-only.
Potential Benefits:
Scale storage automatically to meet increasing demand
Learn More:
ARG Query:
Click the Azure Resource Graph tab to view the query
// cannot-be-validated-with-arg