diff --git a/quickstart/101-aci-linuxcontainer-public-ip/main.tf b/quickstart/101-aci-linuxcontainer-public-ip/main.tf index 0bfb3efdb..bcdc89bc7 100644 --- a/quickstart/101-aci-linuxcontainer-public-ip/main.tf +++ b/quickstart/101-aci-linuxcontainer-public-ip/main.tf @@ -21,6 +21,7 @@ resource "azurerm_container_group" "container" { ip_address_type = "Public" os_type = "Linux" restart_policy = var.restart_policy + zones = var.zone != "" ? [ var.zone ] : null container { name = "${var.container_name_prefix}-${random_string.container_name.result}" diff --git a/quickstart/101-aci-linuxcontainer-public-ip/readme.md b/quickstart/101-aci-linuxcontainer-public-ip/readme.md index 87a81e819..a2e93eb6b 100644 --- a/quickstart/101-aci-linuxcontainer-public-ip/readme.md +++ b/quickstart/101-aci-linuxcontainer-public-ip/readme.md @@ -20,6 +20,7 @@ This template deploys an Azure Container Instance with a public IP address. | `cpu_cores` | Quantity of CPU cores to allocate to the container. | 1 | | `memory_in_gb` | Amount of memory to allocate to the container in gigabytes. | 2 | | `restart_policy` | Behavior of Azure runtime if container has stopped. | Always | +| `zone` | The availability zone to deploy the container group into. If not specified, the container group is nonzonal and might be deployed into any zone. | (empty) | ## Example diff --git a/quickstart/101-aci-linuxcontainer-public-ip/variables.tf b/quickstart/101-aci-linuxcontainer-public-ip/variables.tf index 86ef8b5ca..e3d757986 100644 --- a/quickstart/101-aci-linuxcontainer-public-ip/variables.tf +++ b/quickstart/101-aci-linuxcontainer-public-ip/variables.tf @@ -55,3 +55,9 @@ variable "restart_policy" { error_message = "The restart_policy must be one of the following: Always, Never, OnFailure." } } + +variable "zone" { + type = string + description = "The availability zone to deploy the container group into. If not specified, the container group is nonzonal and might be deployed into any zone." + default = "" +}