Skip to content

Regions with out support for 3 fault domains fail to provision #9

@davidsandilands

Description

@davidsandilands

Describe the Bug

When attempting to provision on to regions with only compatibility for 2 fault domains in an availability region provisioning will fail as the terraform defaults to 3.

Expected Behavior

We would expect the module to use 3 if available and fail to 2 otherwise

Steps to Reproduce

Provisioning a large or xlarge setup to a region like UKSOUTH

Failed on localhost:

Error: compute.AvailabilitySetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidParameter" Message="The specified fault domain count 3 must fall in the range 1 to 2." Target="platformFaultDomainCount"

    with module.instances.azurerm_availability_set.compiler_availability_set[0],
    on modules\instances\main.tf line 184, in resource "azurerm_availability_set" "compiler_availability_set":
   184: resource "azurerm_availability_set" "compiler_availability_set" {

Failed on 1 target: localhost
Ran on 1 target

Additional Context

(https://github.com/MicrosoftDocs/azure-docs/blob/main/includes/managed-disks-common-fault-domain-region-list.md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjira

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions