Skip to content

data-platform-hq/terraform-azurerm-container-instance

Repository files navigation

Azure Container Intance Terraform module

Terraform module for creation Azure Container Intance

Usage

Requirements

Name Version
terraform >= 1.0.0
azurerm >= 3.68.0

Providers

Name Version
azurerm >= 3.68.0

Modules

No modules.

Resources

Name Type
azurerm_container_group.this resource

Inputs

Name Description Type Default Required
container_instance_name Specifies the name of the Container Group. string n/a yes
containers List of objects to configure containers
list(object({
name = string
image = string
cpu = number
memory = number
environment_variables = optional(map(string))
commands = optional(list(string))
ports_tcp = optional(set(string), [])
ports_udp = optional(set(string), [])
volumes = optional(list(object({
mount_path = string
name = string
storage_account_name = optional(string)
storage_account_key = optional(string)
share_name = optional(string)
})), [])
}))
n/a yes
dns_config_nameservers A list of nameservers the containers will search out to resolve requests. list(string) [] no
exposed_ports_tcp Set of ports to expose with TCP protocol set(string) [] no
exposed_ports_udp Set of ports to expose with UDP protocol set(string) [] no
identity_ids Specifies a list of User Assigned Managed Identity IDs to be assigned to this Container Group. list(string) null no
image_registry_credential List of objects to configure connection to private registry
list(object({
server = string
username = string
password = string
}))
[] no
ip_address_type Specifies the IP address type of the container. Public, Private or None. string "Public" no
location Specifies the supported Azure location where the resource exists. string n/a yes
os_type The OS for the container group. Allowed values are Linux and Windows. string "Linux" no
resource_group_name The name of the resource group in which to create the Container Group. string n/a yes
restart_policy Restart policy for the container group. Allowed values are Always, Never, OnFailure. string "Never" no
sku Specifies the sku of the Container Group. Possible values are Confidential, Dedicated and Standard. string "Standard" no
subnet_ids The subnet resource IDs for a container group. list(string) [] no
tags Resource tags. map(string) {} no

Outputs

Name Description
id Id of the Azure Container Instance
identity List of identities assigned to the Azure Container Instance
ip_address Public IP address of the Azure Container Instance
name Name of the Azure Container Instance

License

Apache 2 Licensed. For more information please see LICENSE