Skip to content

[AVM Module Issue]: CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ManagedEnvironmentZoneRedundantNotSupportedInRegion: Zone redundancy is not currently supported in this region. #125

@johnwildes

Description

@johnwildes

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

I'm not sure

(Optional) Module Version

0.2

(Optional) Correlation Id

No response

Description

# Configure the Azure Provider
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "< 5.0.0"
    }
    random = {
      source  = "hashicorp/random"
      version = "~> 3.0"
    }
  }
  required_version = ">= 1.0"
}

# Configure the Microsoft Azure Provider
provider "azurerm" {
  features {}
  
  # Explicitly set subscription ID from custom environment variable
  subscription_id = var.subscription_id
}
resource "random_string" "random" {
  length  = 4
  special = false
}

# Create a resource group
resource "azurerm_resource_group" "main" {
  name     = var.resource_group_name
  location = var.location

  tags = {
    Environment = var.environment
    Project     = var.project_name
  }
}

module "github_runners" {
  source                                       = "Azure/avm-ptn-cicd-agents-and-runners/azurerm"
  version                                      = "~> 0.2"
  postfix                                      = "my-gh-runners-${random_string.random.result}"
  location                                     = var.location
  version_control_system_type                  = "github"
  version_control_system_personal_access_token = "#####################################################"
  version_control_system_organization          = "ctsazurecoe"
  version_control_system_repository            = "cody"
  virtual_network_address_space                = "10.1.0.0/16"
}

Executing the code above results in the error below when northcentralus is a region.
I couldn't find any documentation as to the acceptable regions for the default deployment. eastus also fails because there's no capacity for Container Apps Environment in that region right now.

╷
│ Error: creating Registry (Subscription: "XXXX"
│ Resource Group Name: "rg-my-gh-runners-UWaw"
│ Registry Name: "acrmyghrunnersUWaw"): performing Create: unexpected status 400 (400 Bad Request) with error: ZoneRedundancyNotSupported: Zone redundancy is not supported for the selected location northcentralus.. For more information on availability zone, please visit https://aka.ms/acr/az.
│
│   with module.github_runners.module.container_registry[0].module.container_registry.azurerm_container_registry.this,
│   on .terraform\modules\github_runners.container_registry.container_registry\main.tf line 1, in resource "azurerm_container_registry" "this":
│    1: resource "azurerm_container_registry" "this" {
│
╵
╷
│ Error: creating Managed Environment (Subscription: "XXXX"
│ Resource Group Name: "rg-my-gh-runners-UWaw"
│ Managed Environment Name: "cae-my-gh-runners-UWaw"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ManagedEnvironmentZoneRedundantNotSupportedInRegion: Zone redundancy is not currently supported in this region.
│
│   with module.github_runners.azurerm_container_app_environment.this[0],
│   on .terraform\modules\github_runners\main.container.app.environment.tf line 1, in resource "azurerm_container_app_environment" "this":
│    1: resource "azurerm_container_app_environment" "this" {
│
│ creating Managed Environment (Subscription: "XXXX"
│ Resource Group Name: "rg-my-gh-runners-UWaw"
│ Managed Environment Name: "cae-my-gh-runners-UWaw"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: ManagedEnvironmentZoneRedundantNotSupportedInRegion:    
│ Zone redundancy is not currently supported in this region.

│ Error: updating Public I P Address (Subscription: "XXXXX"
│ Resource Group Name: "rg-my-gh-runners-UWaw"
│ Public I P Addresses Name: "pip-my-gh-runners-UWaw"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: LocationNotSupportAvailabilityZones: The resource 'Microsoft.Network/publicIPAddresses/pip-my-gh-runners-UWaw' does not support availability zones at location 'northcentralus'.
│
│   with module.github_runners.azurerm_public_ip.this[0],
│   on .terraform\modules\github_runners\main.virtual.network.tf line 36, in resource "azurerm_public_ip" "this":
│   36: resource "azurerm_public_ip" "this" {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions