Availability Set should have at least 2 fault domains

Medium Azure General availabilitysets-availability-least-fault-domains

Applies to

  • Microsoft.Compute/availabilitySets

What CGPulse checks

A resource passes this rule when faultDomainCount greaterthanorequal 2. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Configure at least 2 fault domains to protect VMs from hardware failures. In Azure Portal: Availability Set > Properties > verify fault domain count. See: https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview

CLI

az vm availability-set update --ids "{id}" --platform-fault-domain-count 2

Bicep

resource availabilitySet 'Microsoft.Compute/availabilitySets@2024-03-01' = {{
  name: '{name}'
  location: location
  properties: {{
    platformFaultDomainCount: 2
    platformUpdateDomainCount: 5
  }}
  sku: {{
    name: 'Aligned'
  }}
}}

Terraform

resource "azurerm_availability_set" "{name}" {
  name                         = "{name}"
  resource_group_name          = "{rg}"
  location                     = var.location
  platform_fault_domain_count  = 2
  platform_update_domain_count = 5
  managed                      = true
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related Azure rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.