Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quickstart/101-aci-linuxcontainer-public-ip/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
1 change: 1 addition & 0 deletions quickstart/101-aci-linuxcontainer-public-ip/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions quickstart/101-aci-linuxcontainer-public-ip/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
}