hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Support for Azure Container Instances availability zones #15893

Open aidapsibr opened 2 years ago

aidapsibr commented 2 years ago

Community Note

Description

ACI has introduced preview support for zonal deployments, this should track adding that support to the provider.

New or Affected Resource(s)

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

resource "azurerm_container_group" "dns_container_group" {
  name                = local.aci_group_name
  location            = azurerm_resource_group.dns_rg.location
  resource_group_name = azurerm_resource_group.dns_rg.name
  ip_address_type     = "Private"
  os_type             = "Linux"

  zones = [1,2,3]

  exposed_port {
      port = 53
      protocol = "UDP"
  }

  restart_policy = "Always"

  network_profile_id = azurerm_network_profile.dns_network_profile.id

  container {
    name   = "az-dns-forwarder"
    image  = "ghcr.io/whiteducksoftware/az-dns-forwarder/az-dns-forwarder:latest"
    // https://github.com/whiteducksoftware/az-dns-forwarder
    cpu    = "1"
    memory = "0.5"

    ports {
      port     = 53
      protocol = "UDP"
    }
  }
}

References

https://docs.microsoft.com/en-us/azure/container-instances/availability-zones

kgopi1 commented 2 years ago

looking for support availability zones

kgopi1 commented 2 years ago

Hi @aidapsibr , Azure container instance in private network doesn't support availability zone https://docs.microsoft.com/en-gb/azure/container-instances/availability-zones#limitations. Hence this may not helpful ..