Azure module to deploy a Azure Container Apps.
| Module version | Terraform version | OpenTofu version | AzureRM version |
|---|---|---|---|
| >= 8.x.x | Unverified | 1.8.x | >= 4.0 |
| >= 7.x.x | 1.3.x | >= 3.0 | |
| >= 6.x.x | 1.x | >= 3.0 | |
| >= 5.x.x | 0.15.x | >= 2.0 | |
| >= 4.x.x | 0.13.x / 0.14.x | >= 2.0 | |
| >= 3.x.x | 0.12.x | >= 2.0 | |
| >= 2.x.x | 0.12.x | < 2.0 | |
| < 2.x.x | 0.11.x | < 2.0 |
If you want to contribute to this repository, feel free to use our pre-commit git hook configuration which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices.
More details are available in the CONTRIBUTING.md file.
This module is optimized to work with the Claranet terraform-wrapper tool
which set some terraform variables in the environment needed by this module.
More details about variables set by the terraform-wrapper available in the documentation.
module "container_app" {
source = "claranet/container-apps/azurerm"
version = "x.x.x"
location = module.azure_region.location
location_short = module.azure_region.location_short
resource_group_name = module.rg.name
client_name = var.client_name
environment = var.environment
stack = var.stack
containers = [
{
name = "helloworld"
image = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
cpu = 0.25
memory = "0.5Gi"
},
]
logs_destinations_ids = [
module.logs.storage_account_id,
module.logs.id
]
extra_tags = {
foo = "bar"
}
}No providers.
| Name | Source | Version |
|---|---|---|
| container_app | ./modules/container-app | n/a |
| container_app_environment | ./modules/container-app-environment | n/a |
No resources.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| azure_queue_scale_rules | Parameters used to define one or moreazure_queue_scale_rule object. |
list(object({ |
[] |
no |
| certificate | Container App Environment Certificate parameters. | list(object({ |
[] |
no |
| client_name | Client name/account used in naming. | string |
n/a | yes |
| container_app_custom_name | Name of the Container App, generated if not set. | string |
"" |
no |
| container_app_environment_custom_name | Name of the Container App Environment, generated if not set. | string |
"" |
no |
| containers | Configuration of one or more containers. | list(object({ |
[] |
no |
| custom_domain_certificate_blob_base64 | The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM. | string |
"" |
no |
| custom_domain_certificate_password | The password for the Certificate bundle. | string |
"" |
no |
| custom_domain_dns_suffix | Custom DNS Suffix for the Container App Environment. | string |
"" |
no |
| custom_domain_enabled | Should the Container App Environment be configured with a Custom Domain? Defaults to false. |
bool |
false |
no |
| custom_scale_rules | Parameters used to define one or more custom_scale_rule object. |
list(object({ |
[] |
no |
| dapr_application_insights_connection_string | Application Insights connection string used by Dapr to export Service to Service communication telemetry. Changing this forces a new resource to be created. | string |
null |
no |
| dapr_components | Dapr Components to be added to the Container App Environment. | list(object({ |
[] |
no |
| daprs | Parameters used to define one or more dapr object. |
list(object({ |
[] |
no |
| default_tags_enabled | Option to enable or disable default tags. | bool |
true |
no |
| diagnostic_settings_custom_name | Custom name of the diagnostics settings, name will be 'default' if not set. | string |
"default" |
no |
| environment | Project environment. | string |
n/a | yes |
| extra_tags | Additional tags to add on resources. | map(string) |
{} |
no |
| http_scale_rules | Parameters used to define one or more http_scale_rule object. |
list(object({ |
[] |
no |
| identity | Map with identity block information. | object({ |
{ |
no |
| infrastructure_resource_group_name | Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. Changing this forces a new resource to be created. | string |
null |
no |
| infrastructure_subnet | The existing Subnet to use for the Container Apps Control Plane. Changing this forces a new resource to be created. The Subnet must have a /27 or larger address space. |
object({ |
null |
no |
| ingresses | Parameters used to define one or more ingress object. |
list(object({ |
[] |
no |
| init_containers | Configuration of one or more init containers. | list(object({ |
[] |
no |
| internal_load_balancer_enabled | Should the Container Environment operate in Internal Load Balancing Mode? Defaults to false. Changing this forces a new resource to be created. |
bool |
false |
no |
| location | Azure region to use. | string |
n/a | yes |
| location_short | Short string for Azure location. | string |
n/a | yes |
| logs_categories | Log categories to send to destinations. | list(string) |
null |
no |
| logs_destinations_ids | List of destination resources IDs for logs diagnostic destination. Can be Storage Account, Log Analytics Workspace and Event Hub. No more than one of each can be set.If you want to use Azure EventHub as a destination, you must provide a formatted string containing both the EventHub Namespace authorization send ID and the EventHub name (name of the queue to use in the Namespace) separated by the | character. |
list(string) |
n/a | yes |
| logs_metrics_categories | Metrics categories to send to destinations. | list(string) |
null |
no |
| max_inactive_revisions | The maximum of inactive revisions allowed for this Container App. | number |
null |
no |
| mutual_tls_enabled | Should mutual transport layer security (mTLS) be enabled? Defaults to false. |
bool |
false |
no |
| name_prefix | Optional prefix for the generated name. | string |
"" |
no |
| name_suffix | Optional suffix for the generated name. | string |
"" |
no |
| registries | Parameters used to define one or more registry object. |
list(object({ |
[] |
no |
| resource_group_name | Name of the resource group. | string |
n/a | yes |
| revision_mode | The revisions operational mode for the Container App. Possible values include Single and Multiple. In Single mode, a single revision is in operation at any given time. In Multiple mode, more than one revision can be active at a time and can be configured with load distribution via the traffic_weight block in the ingress configuration. |
string |
"Single" |
no |
| revision_suffix | The suffix for the revision. This value must be unique for the lifetime of the Resource. If omitted the service will use a hash function to create one. | string |
"" |
no |
| secrets | Parameters used to define one or more secret object. |
list(object({ |
[] |
no |
| stack | Project stack name. | string |
n/a | yes |
| storage | Storage parameters for the Container App Environment. | list(object({ |
[] |
no |
| tcp_scale_rules | Parameters used to define one or more tcp_scale_rule object. |
list(object({ |
[] |
no |
| template_max_replicas | The maximum number of replicas for this container. | number |
null |
no |
| template_min_replicas | The minimum number of replicas for this container. | number |
null |
no |
| termination_grace_period_seconds | The time in seconds after the container is sent the termination signal before the process if forcibly killed. | number |
null |
no |
| volumes | Parameters used to define one or more volume object. |
list(object({ |
[] |
no |
| workload_profile | The profile of the workload to scope the container app execution. | map(object({ |
{ |
no |
| workload_profile_name | The name of the Workload Profile in the Container App Environment to place this Container App. | string |
null |
no |
| zone_redundancy_enabled | Should the Container App Environment be created with Zone Redundancy enabled? Defaults to false. Changing this forces a new resource to be created. |
bool |
true |
no |
| Name | Description |
|---|---|
| module_container_app | Container App output object. Please refer to ./modules/container-app/README.md. |
| module_container_app_environment | Container App Environment output object. Please refer to ./modules/container-app-environment/README.md. |
Microsoft Azure documentation: xxxx