Skip to content

Update Container App module adding support to Functions#974

Draft
Krusty93 wants to merge 20 commits intomainfrom
CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app
Draft

Update Container App module adding support to Functions#974
Krusty93 wants to merge 20 commits intomainfrom
CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app

Conversation

@Krusty93
Copy link
Copy Markdown
Contributor

@Krusty93 Krusty93 commented Oct 6, 2025

Close CES-1339

Depends on #961

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: b21469c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
azure_container_app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Krusty93 Krusty93 requested a review from Copilot October 7, 2025 07:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Azure Container Apps deployment mode to the existing Azure Function App Terraform module. The module now supports both traditional App Service Plan-based deployments and the newer Container Apps environment approach, allowing users to choose between the two deployment models based on their requirements.

Key changes:

  • Added a new container_app_config variable to enable Container Apps mode when provided
  • Implemented conditional resource creation logic to deploy either traditional Function App or Container App based on configuration
  • Added proper RBAC assignments and networking configurations for Container Apps deployment

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
variables.tf Added container_app_config variable and updated validation logic for conditional requirements
tier.tf Added CPU and memory mappings for Container Apps resource sizing
subnets.tf Removed standalone subnet resource (moved to networking.tf)
rbac.tf Added conditional RBAC assignments for both deployment modes and Key Vault access
outputs.tf Updated outputs to handle both deployment modes with container_app section
networking.tf Consolidated subnet creation and added conditional private endpoint creation
main.tf Added azapi provider requirement and updated azurerm version constraint
locals.tf Added Container Apps-specific local variables and conditional logic
function_app_slot.tf Updated resource references to use array indexing
function_app.tf Made Function App resource conditional based on deployment mode
container_app.tf New file implementing Azure Container App resource with full configuration
alerts.tf Updated alerts to exclude Container Apps deployment mode
Various example files Added complete Container Apps deployment example

@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from 771baac to 42034d1 Compare October 8, 2025 09:05
@Krusty93 Krusty93 requested review from Copilot and mamu0 October 8, 2025 09:05
@Krusty93 Krusty93 marked this pull request as ready for review October 8, 2025 09:05
@Krusty93 Krusty93 requested a review from a team as a code owner October 8, 2025 09:05
@Krusty93 Krusty93 requested a review from gz-dx-bot October 8, 2025 09:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from 31cebc2 to d2af60e Compare October 8, 2025 09:11

container_app_environment_id = module.container_app_environment.id

user_assigned_identity_id = module.container_app_environment.user_assigned_identity.id
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: can we put this setting into the container app module itself? in order to avoid users specify this and just provide the cae

Copy link
Copy Markdown
Contributor Author

@Krusty93 Krusty93 Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid we can't unless we use a data in the module, but it will not be able to create the environment and the app at the same time as there's an nonexistent dependency in the plan phase

@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from d2af60e to 07ec8a8 Compare October 8, 2025 09:47
@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from 420a4a8 to ed5926f Compare October 8, 2025 09:50
@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from 99cb95b to 27f9144 Compare October 31, 2025 10:05
@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from 9065e85 to f859951 Compare October 31, 2025 10:34
@Krusty93 Krusty93 force-pushed the CES-1339-modificare-il-modulo-terraform-per-azure-function-per-supportare-container-app branch from f859951 to 4e56401 Compare October 31, 2025 11:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
Lock Terraform Registry modules..................................(no files to check)Skipped
Terraform Providers Lock (on staged .terraform.lock.hcl files).......................Passed
- hook id: terraform_providers_lock_staged
- duration: 0.07s

No .terraform.lock.hcl files to process.

Terraform fmt........................................................................Passed
terraform_docs on modules............................................................Failed
- hook id: terraform_docs
- files were modified by this hook
terraform_docs on resources......................................(no files to check)Skipped
Terraform validate with tflint.......................................................Passed
Terraform validate...................................................................Passed
Terraform validate with trivy........................................................Passed
All changes made by hooks:
diff --git a/infra/modules/azure_function_app/README.md b/infra/modules/azure_function_app/README.md
index fd4f7ed4..998f5664 100644
--- a/infra/modules/azure_function_app/README.md
+++ b/infra/modules/azure_function_app/README.md
@@ -38,13 +38,12 @@ For a complete example, see the [examples/complete](https://github.com/pagopa-dx
 
 <!-- markdownlint-disable -->
 <!-- BEGIN_TF_DOCS -->
-
 ## Requirements
 
-| Name                                                               | Version           |
-| ------------------------------------------------------------------ | ----------------- |
-| <a name="requirement_azurerm"></a> [azurerm](#requirement_azurerm) | >= 4.8.0, < 5.0   |
-| <a name="requirement_dx"></a> [dx](#requirement_dx)                | >= 0.6.0, < 1.0.0 |
+| Name | Version |
+|------|---------|
+| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 4.8.0, < 5.0 |
+| <a name="requirement_dx"></a> [dx](#requirement\_dx) | >= 0.6.0, < 1.0.0 |
 
 ## Modules
 
@@ -52,84 +51,6 @@ No modules.
 
 ## Resources
 
-| Name                                                                                                                                                                               | Type        |
-| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
-| [azapi_resource.this](https://registry.terraform.io/providers/azure/azapi/latest/docs/resources/resource)                                                                          | resource    |
-| [azurerm_key_vault_access_policy.key_vault](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_access_policy)                               | resource    |
-| [azurerm_linux_function_app.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app)                                              | resource    |
-| [azurerm_linux_function_app_slot.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app_slot)                                    | resource    |
-| [azurerm_monitor_metric_alert.function_app_health_check](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert)                     | resource    |
-| [azurerm_monitor_metric_alert.storage_account_health_check](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_metric_alert)                  | resource    |
-| [azurerm_private_endpoint.function_sites](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                        | resource    |
-| [azurerm_private_endpoint.st_blob](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                               | resource    |
-| [azurerm_private_endpoint.st_file](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                               | resource    |
-| [azurerm_private_endpoint.st_queue](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                              | resource    |
-| [azurerm_private_endpoint.staging_function_sites](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                | resource    |
-| [azurerm_private_endpoint.std_blob](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                              | resource    |
-| [azurerm_private_endpoint.std_file](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                              | resource    |
-| [azurerm_private_endpoint.std_queue](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                             | resource    |
-| [azurerm_private_endpoint.std_table](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint)                                             | resource    |
-| [azurerm_role_assignment.ca_storage_account_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                          | resource    |
-| [azurerm_role_assignment.ca_storage_blob_data_owner](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                              | resource    |
-| [azurerm_role_assignment.ca_storage_queue_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                       | resource    |
-| [azurerm_role_assignment.durable_function_storage_blob_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)          | resource    |
-| [azurerm_role_assignment.durable_function_storage_queue_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)         | resource    |
-| [azurerm_role_assignment.durable_function_storage_table_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)         | resource    |
-| [azurerm_role_assignment.function_storage_account_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                    | resource    |
-| [azurerm_role_assignment.function_storage_blob_data_owner](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                        | resource    |
-| [azurerm_role_assignment.function_storage_queue_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                 | resource    |
-| [azurerm_role_assignment.key_vault](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                                               | resource    |
-| [azurerm_role_assignment.staging_durable_function_storage_blob_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)  | resource    |
-| [azurerm_role_assignment.staging_durable_function_storage_queue_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource    |
-| [azurerm_role_assignment.staging_durable_function_storage_table_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource    |
-| [azurerm_role_assignment.staging_function_storage_account_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)            | resource    |
-| [azurerm_role_assignment.staging_function_storage_blob_data_owner](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)                | resource    |
-| [azurerm_role_assignment.staging_function_storage_queue_data_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment)         | resource    |
-| [azurerm_service_plan.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/service_plan)                                                          | resource    |
-| [azurerm_storage_account.durable_function](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account)                                        | resource    |
-| [azurerm_storage_account.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account)                                                    | resource    |
-| [azurerm_storage_account_network_rules.st_network_rules](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account_network_rules)            | resource    |
-| [azurerm_storage_account_network_rules.std_network_rules](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account_network_rules)           | resource    |
-| [azurerm_subnet.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet)                                                                      | resource    |
-| [azurerm_private_dns_zone.function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone)                                       | data source |
-| [azurerm_private_dns_zone.storage_account_blob](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone)                               | data source |
-| [azurerm_private_dns_zone.storage_account_file](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone)                               | data source |
-| [azurerm_private_dns_zone.storage_account_queue](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone)                              | data source |
-| [azurerm_private_dns_zone.storage_account_table](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/private_dns_zone)                              | data source |
-| [azurerm_virtual_network.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/virtual_network)                                                 | data source |
-
-## Inputs
-
-| Name                                                                                                                                                      | Description                                                                                                                                                                                            | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Default     | Required |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | :------: |
-| <a name="input_action_group_ids"></a> [action_group_ids](#input_action_group_ids)                                                                         | The ID of the Action Groups to invoke when an alert is triggered for the Function App.                                                                                                                 | `set(string)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `[]`        |    no    |
-| <a name="input_app_service_plan_id"></a> [app_service_plan_id](#input_app_service_plan_id)                                                                | The ID of the App Service Plan where the Function App will be hosted. Leave null to create a new plan.                                                                                                 | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_app_settings"></a> [app_settings](#input_app_settings)                                                                                     | A map of application settings for the Function App.                                                                                                                                                    | `map(string)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | n/a         |   yes    |
-| <a name="input_application_insights_connection_string"></a> [application_insights_connection_string](#input_application_insights_connection_string)       | The connection string for Application Insights to enable monitoring and diagnostics.                                                                                                                   | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_application_insights_key"></a> [application_insights_key](#input_application_insights_key)                                                 | The instrumentation key for Application Insights to enable monitoring and diagnostics.                                                                                                                 | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_application_insights_sampling_percentage"></a> [application_insights_sampling_percentage](#input_application_insights_sampling_percentage) | The sampling percentage for Application Insights telemetry. Default is 5.                                                                                                                              | `number`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `5`         |    no    |
-| <a name="input_container_app_config"></a> [container_app_config](#input_container_app_config)                                                             | Configuration for the container app. If not null, a container app will be created.                                                                                                                     | <pre>object({<br/> environment_id = string<br/> user_assigned_identity_id = string<br/> image = string<br/> key_vault = object({<br/> id = string<br/> use_rbac = optional(bool, true)<br/> tenant_id = string<br/> })<br/> name = optional(string, "")<br/> active_revisions_mode = optional(string, "Single")<br/> target_port = optional(number, 80)<br/> min_replicas = optional(number, 1)<br/> max_replicas = optional(number, 1000)<br/> secrets = optional(map(object(<br/> {<br/> name = string<br/> key_vault_secret_id = string<br/> }<br/> )), {})<br/> })</pre> | `null`      |    no    |
-| <a name="input_environment"></a> [environment](#input_environment)                                                                                        | Values which are used to generate resource names and location short names. They are all mandatory except for domain, which should not be used only in the case of a resource used by multiple domains. | <pre>object({<br/> prefix = string<br/> env_short = string<br/> location = string<br/> domain = optional(string)<br/> app_name = string<br/> instance_number = string<br/> })</pre>                                                                                                                                                                                                                                                                                                                                                                                          | n/a         |   yes    |
-| <a name="input_has_durable_functions"></a> [has_durable_functions](#input_has_durable_functions)                                                          | Set to true if the Function App hosts Durable Functions.                                                                                                                                               | `bool`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `false`     |    no    |
-| <a name="input_health_check_path"></a> [health_check_path](#input_health_check_path)                                                                      | The endpoint path where the health probe is exposed for the Function App.                                                                                                                              | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | n/a         |   yes    |
-| <a name="input_java_version"></a> [java_version](#input_java_version)                                                                                     | The version of Java to use for the Function App runtime.                                                                                                                                               | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `17`        |    no    |
-| <a name="input_node_version"></a> [node_version](#input_node_version)                                                                                     | The version of Node.js to use for the Function App runtime.                                                                                                                                            | `number`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `20`        |    no    |
-| <a name="input_private_dns_zone_resource_group_name"></a> [private_dns_zone_resource_group_name](#input_private_dns_zone_resource_group_name)             | The name of the resource group containing the private DNS zone for private endpoints. Defaults to the Virtual Network resource group.                                                                  | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_resource_group_name"></a> [resource_group_name](#input_resource_group_name)                                                                | The name of the resource group where resources will be deployed.                                                                                                                                       | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | n/a         |   yes    |
-| <a name="input_size"></a> [size](#input_size)                                                                                                             | App Service Plan size. Allowed values: 'P0v3', 'P1v3', 'P2mv3', 'P3mv3'. If not set, it will be determined by the use_case.                                                                            | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_slot_app_settings"></a> [slot_app_settings](#input_slot_app_settings)                                                                      | A map of application settings specific to the staging slot of the Function App.                                                                                                                        | `map(string)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `{}`        |    no    |
-| <a name="input_stack"></a> [stack](#input_stack)                                                                                                          | The runtime stack for the Function App. Allowed values are 'node' and 'java'.                                                                                                                          | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `"node"`    |    no    |
-| <a name="input_sticky_app_setting_names"></a> [sticky_app_setting_names](#input_sticky_app_setting_names)                                                 | A list of application setting names that should remain constant and not be swapped between slots.                                                                                                      | `list(string)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `[]`        |    no    |
-| <a name="input_subnet_cidr"></a> [subnet_cidr](#input_subnet_cidr)                                                                                        | The CIDR block for the subnet used by the Function App for outbound connectivity. Mandatory if 'subnet_id' is not set.                                                                                 | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_subnet_id"></a> [subnet_id](#input_subnet_id)                                                                                              | The ID of the subnet where the Function App will be hosted. Leave null to create a new subnet.                                                                                                         | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `null`      |    no    |
-| <a name="input_subnet_pep_id"></a> [subnet_pep_id](#input_subnet_pep_id)                                                                                  | The ID of the subnet designated for private endpoints.                                                                                                                                                 | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | n/a         |   yes    |
-| <a name="input_subnet_service_endpoints"></a> [subnet_service_endpoints](#input_subnet_service_endpoints)                                                 | Enable service endpoints for the subnet used by the Function App. Set this only if dependencies do not use private endpoints.                                                                          | <pre>object({<br/> cosmos = optional(bool, false)<br/> storage = optional(bool, false)<br/> web = optional(bool, false)<br/> })</pre>                                                                                                                                                                                                                                                                                                                                                                                                                                        | `null`      |    no    |
-| <a name="input_tags"></a> [tags](#input_tags)                                                                                                             | A map of tags to assign to the resources.                                                                                                                                                              | `map(any)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | n/a         |   yes    |
-| <a name="input_tls_version"></a> [tls_version](#input_tls_version)                                                                                        | Minimum TLS version for the App Service.                                                                                                                                                               | `number`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `1.2`       |    no    |
-| <a name="input_use_case"></a> [use_case](#input_use_case)                                                                                                 | Function App use case. Allowed values: 'default', 'high_load'.                                                                                                                                         | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | `"default"` |    no    |
-| <a name="input_virtual_network"></a> [virtual_network](#input_virtual_network)                                                                            | Details of the virtual network where the subnet for the Function App will be created.                                                                                                                  | <pre>object({<br/> name = string<br/> resource_group_name = string<br/> })</pre>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | n/a         |   yes    |
-
-=======
 | Name | Type |
 |------|------|
 | [azurerm_linux_function_app.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app) | resource |
@@ -172,40 +93,40 @@ No modules.
 
 ## Inputs
 
-| Name                                                                                                                                                      | Description                                                                                                                                                                                            | Type                                                                                                                                                                                | Default  | Required |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | :------: |
-| <a name="input_action_group_ids"></a> [action_group_ids](#input_action_group_ids)                                                                         | The ID of the Action Groups to invoke when an alert is triggered for the Function App.                                                                                                                 | `set(string)`                                                                                                                                                                       | `[]`     |    no    |
-| <a name="input_app_service_plan_id"></a> [app_service_plan_id](#input_app_service_plan_id)                                                                | The ID of the App Service Plan where the Function App will be hosted. Leave null to create a new plan.                                                                                                 | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_app_settings"></a> [app_settings](#input_app_settings)                                                                                     | A map of application settings for the Function App.                                                                                                                                                    | `map(string)`                                                                                                                                                                       | n/a      |   yes    |
-| <a name="input_application_insights_connection_string"></a> [application_insights_connection_string](#input_application_insights_connection_string)       | The connection string for Application Insights to enable monitoring and diagnostics.                                                                                                                   | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_application_insights_key"></a> [application_insights_key](#input_application_insights_key)                                                 | The instrumentation key for Application Insights to enable monitoring and diagnostics.                                                                                                                 | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_application_insights_sampling_percentage"></a> [application_insights_sampling_percentage](#input_application_insights_sampling_percentage) | The sampling percentage for Application Insights telemetry. Default is 5.                                                                                                                              | `number`                                                                                                                                                                            | `5`      |    no    |
-| <a name="input_environment"></a> [environment](#input_environment)                                                                                        | Values which are used to generate resource names and location short names. They are all mandatory except for domain, which should not be used only in the case of a resource used by multiple domains. | <pre>object({<br/> prefix = string<br/> env_short = string<br/> location = string<br/> domain = optional(string)<br/> app_name = string<br/> instance_number = string<br/> })</pre> | n/a      |   yes    |
-| <a name="input_has_durable_functions"></a> [has_durable_functions](#input_has_durable_functions)                                                          | Set to true if the Function App hosts Durable Functions.                                                                                                                                               | `bool`                                                                                                                                                                              | `false`  |    no    |
-| <a name="input_health_check_path"></a> [health_check_path](#input_health_check_path)                                                                      | The endpoint path where the health probe is exposed for the Function App.                                                                                                                              | `string`                                                                                                                                                                            | n/a      |   yes    |
-| <a name="input_java_version"></a> [java_version](#input_java_version)                                                                                     | The version of Java to use for the Function App runtime.                                                                                                                                               | `string`                                                                                                                                                                            | `17`     |    no    |
-| <a name="input_node_version"></a> [node_version](#input_node_version)                                                                                     | The version of Node.js to use for the Function App runtime.                                                                                                                                            | `number`                                                                                                                                                                            | `20`     |    no    |
-| <a name="input_private_dns_zone_resource_group_name"></a> [private_dns_zone_resource_group_name](#input_private_dns_zone_resource_group_name)             | The name of the resource group containing the private DNS zone for private endpoints. Defaults to the Virtual Network resource group.                                                                  | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_resource_group_name"></a> [resource_group_name](#input_resource_group_name)                                                                | The name of the resource group where resources will be deployed.                                                                                                                                       | `string`                                                                                                                                                                            | n/a      |   yes    |
-| <a name="input_slot_app_settings"></a> [slot_app_settings](#input_slot_app_settings)                                                                      | A map of application settings specific to the staging slot of the Function App.                                                                                                                        | `map(string)`                                                                                                                                                                       | `{}`     |    no    |
-| <a name="input_stack"></a> [stack](#input_stack)                                                                                                          | The runtime stack for the Function App. Allowed values are 'node' and 'java'.                                                                                                                          | `string`                                                                                                                                                                            | `"node"` |    no    |
-| <a name="input_sticky_app_setting_names"></a> [sticky_app_setting_names](#input_sticky_app_setting_names)                                                 | A list of application setting names that should remain constant and not be swapped between slots.                                                                                                      | `list(string)`                                                                                                                                                                      | `[]`     |    no    |
-| <a name="input_subnet_cidr"></a> [subnet_cidr](#input_subnet_cidr)                                                                                        | The CIDR block for the subnet used by the Function App for outbound connectivity. Mandatory if 'subnet_id' is not set.                                                                                 | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_subnet_id"></a> [subnet_id](#input_subnet_id)                                                                                              | The ID of the subnet where the Function App will be hosted. Leave null to create a new subnet.                                                                                                         | `string`                                                                                                                                                                            | `null`   |    no    |
-| <a name="input_subnet_pep_id"></a> [subnet_pep_id](#input_subnet_pep_id)                                                                                  | The ID of the subnet designated for private endpoints.                                                                                                                                                 | `string`                                                                                                                                                                            | n/a      |   yes    |
-| <a name="input_subnet_service_endpoints"></a> [subnet_service_endpoints](#input_subnet_service_endpoints)                                                 | Enable service endpoints for the subnet used by the Function App. Set this only if dependencies do not use private endpoints.                                                                          | <pre>object({<br/> cosmos = optional(bool, false)<br/> storage = optional(bool, false)<br/> web = optional(bool, false)<br/> })</pre>                                               | `null`   |    no    |
-| <a name="input_tags"></a> [tags](#input_tags)                                                                                                             | A map of tags to assign to the resources.                                                                                                                                                              | `map(any)`                                                                                                                                                                          | n/a      |   yes    |
-| <a name="input_tier"></a> [tier](#input_tier)                                                                                                             | Resource tiers depending on workload. Allowed values are 's', 'm', 'l', 'xl'. Legacy values 'premium', 'standard', 'test' are also supported for backward compatibility.                               | `string`                                                                                                                                                                            | `"l"`    |    no    |
-| <a name="input_tls_version"></a> [tls_version](#input_tls_version)                                                                                        | Minimum TLS version for the App Service.                                                                                                                                                               | `number`                                                                                                                                                                            | `1.2`    |    no    |
-| <a name="input_virtual_network"></a> [virtual_network](#input_virtual_network)                                                                            | Details of the virtual network where the subnet for the Function App will be created.                                                                                                                  | <pre>object({<br/> name = string<br/> resource_group_name = string<br/> })</pre>                                                                                                    | n/a      |   yes    |
+| Name | Description | Type | Default | Required |
+|------|-------------|------|---------|:--------:|
+| <a name="input_action_group_ids"></a> [action\_group\_ids](#input\_action\_group\_ids) | The ID of the Action Groups to invoke when an alert is triggered for the Function App. | `set(string)` | `[]` | no |
+| <a name="input_app_service_plan_id"></a> [app\_service\_plan\_id](#input\_app\_service\_plan\_id) | The ID of the App Service Plan where the Function App will be hosted. Leave null to create a new plan. | `string` | `null` | no |
+| <a name="input_app_settings"></a> [app\_settings](#input\_app\_settings) | A map of application settings for the Function App. | `map(string)` | n/a | yes |
+| <a name="input_application_insights_connection_string"></a> [application\_insights\_connection\_string](#input\_application\_insights\_connection\_string) | The connection string for Application Insights to enable monitoring and diagnostics. | `string` | `null` | no |
+| <a name="input_application_insights_key"></a> [application\_insights\_key](#input\_application\_insights\_key) | The instrumentation key for Application Insights to enable monitoring and diagnostics. | `string` | `null` | no |
+| <a name="input_application_insights_sampling_percentage"></a> [application\_insights\_sampling\_percentage](#input\_application\_insights\_sampling\_percentage) | The sampling percentage for Application Insights telemetry. Default is 5. | `number` | `5` | no |
+| <a name="input_environment"></a> [environment](#input\_environment) | Values which are used to generate resource names and location short names. They are all mandatory except for domain, which should not be used only in the case of a resource used by multiple domains. | <pre>object({<br/>    prefix          = string<br/>    env_short       = string<br/>    location        = string<br/>    domain          = optional(string)<br/>    app_name        = string<br/>    instance_number = string<br/>  })</pre> | n/a | yes |
+| <a name="input_has_durable_functions"></a> [has\_durable\_functions](#input\_has\_durable\_functions) | Set to true if the Function App hosts Durable Functions. | `bool` | `false` | no |
+| <a name="input_health_check_path"></a> [health\_check\_path](#input\_health\_check\_path) | The endpoint path where the health probe is exposed for the Function App. | `string` | n/a | yes |
+| <a name="input_java_version"></a> [java\_version](#input\_java\_version) | The version of Java to use for the Function App runtime. | `string` | `17` | no |
+| <a name="input_node_version"></a> [node\_version](#input\_node\_version) | The version of Node.js to use for the Function App runtime. | `number` | `20` | no |
+| <a name="input_private_dns_zone_resource_group_name"></a> [private\_dns\_zone\_resource\_group\_name](#input\_private\_dns\_zone\_resource\_group\_name) | The name of the resource group containing the private DNS zone for private endpoints. Defaults to the Virtual Network resource group. | `string` | `null` | no |
+| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | The name of the resource group where resources will be deployed. | `string` | n/a | yes |
+| <a name="input_size"></a> [size](#input\_size) | App Service Plan size. Allowed values: 'P0v3', 'P1v3', 'P2mv3', 'P3mv3'. If not set, it will be determined by the use\_case. | `string` | `null` | no |
+| <a name="input_slot_app_settings"></a> [slot\_app\_settings](#input\_slot\_app\_settings) | A map of application settings specific to the staging slot of the Function App. | `map(string)` | `{}` | no |
+| <a name="input_stack"></a> [stack](#input\_stack) | The runtime stack for the Function App. Allowed values are 'node' and 'java'. | `string` | `"node"` | no |
+| <a name="input_sticky_app_setting_names"></a> [sticky\_app\_setting\_names](#input\_sticky\_app\_setting\_names) | A list of application setting names that should remain constant and not be swapped between slots. | `list(string)` | `[]` | no |
+| <a name="input_subnet_cidr"></a> [subnet\_cidr](#input\_subnet\_cidr) | The CIDR block for the subnet used by the Function App for outbound connectivity. Mandatory if 'subnet\_id' is not set. | `string` | `null` | no |
+| <a name="input_subnet_id"></a> [subnet\_id](#input\_subnet\_id) | The ID of the subnet where the Function App will be hosted. Leave null to create a new subnet. | `string` | `null` | no |
+| <a name="input_subnet_pep_id"></a> [subnet\_pep\_id](#input\_subnet\_pep\_id) | The ID of the subnet designated for private endpoints. | `string` | n/a | yes |
+| <a name="input_subnet_service_endpoints"></a> [subnet\_service\_endpoints](#input\_subnet\_service\_endpoints) | Enable service endpoints for the subnet used by the Function App. Set this only if dependencies do not use private endpoints. | <pre>object({<br/>    cosmos  = optional(bool, false)<br/>    storage = optional(bool, false)<br/>    web     = optional(bool, false)<br/>  })</pre> | `null` | no |
+| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the resources. | `map(any)` | n/a | yes |
+| <a name="input_tls_version"></a> [tls\_version](#input\_tls\_version) | Minimum TLS version for the App Service. | `number` | `1.2` | no |
+| <a name="input_use_case"></a> [use\_case](#input\_use\_case) | Function App use case. Allowed values: 'default', 'high\_load'. | `string` | `"default"` | no |
+| <a name="input_virtual_network"></a> [virtual\_network](#input\_virtual\_network) | Details of the virtual network where the subnet for the Function App will be created. | <pre>object({<br/>    name                = string<br/>    resource_group_name = string<br/>  })</pre> | n/a | yes |
 
 ## Outputs
 
-| Name                                                                                                     | Description                                                                                                                                                                                                      |
-| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a name="output_function_app"></a> [function_app](#output_function_app)                                  | Details of the Function App, including its resource group, service plan, and app-specific information such as ID, name, principal ID, and default hostname. Also includes details of the app slot if configured. |
-| <a name="output_storage_account"></a> [storage_account](#output_storage_account)                         | Details of the primary storage account used by the Function App, including its ID and name.                                                                                                                      |
-| <a name="output_storage_account_durable"></a> [storage_account_durable](#output_storage_account_durable) | Details of the storage account used for durable functions, including its ID and name. Returns null if not configured.                                                                                            |
-| <a name="output_subnet"></a> [subnet](#output_subnet)                                                    | Details of the subnet used by the Function App, including its ID and name.                                                                                                                                       |
-
+| Name | Description |
+|------|-------------|
+| <a name="output_function_app"></a> [function\_app](#output\_function\_app) | Details of the Function App, including its resource group, service plan, and app-specific information such as ID, name, principal ID, and default hostname. Also includes details of the app slot if configured. |
+| <a name="output_storage_account"></a> [storage\_account](#output\_storage\_account) | Details of the primary storage account used by the Function App, including its ID and name. |
+| <a name="output_storage_account_durable"></a> [storage\_account\_durable](#output\_storage\_account\_durable) | Details of the storage account used for durable functions, including its ID and name. Returns null if not configured. |
+| <a name="output_subnet"></a> [subnet](#output\_subnet) | Details of the subnet used by the Function App, including its ID and name. |
 <!-- END_TF_DOCS -->

Generated on Tue Nov 4 10:42:55 UTC 2025
Run all checks on modified files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants