Update Container App module adding support to Functions#974
Update Container App module adding support to Functions#974
Conversation
🦋 Changeset detectedLatest commit: b21469c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
infra/modules/azure_function_app/examples/container_app/main.tf
Outdated
Show resolved
Hide resolved
infra/modules/azure_function_app/examples/container_app/main.tf
Outdated
Show resolved
Hide resolved
infra/modules/azure_function_app/examples/container_app/main.tf
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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_configvariable 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 |
771baac to
42034d1
Compare
31cebc2 to
d2af60e
Compare
infra/modules/azure_container_app/examples/function_app/main.tf
Outdated
Show resolved
Hide resolved
|
|
||
| container_app_environment_id = module.container_app_environment.id | ||
|
|
||
| user_assigned_identity_id = module.container_app_environment.user_assigned_identity.id |
There was a problem hiding this comment.
question: can we put this setting into the container app module itself? in order to avoid users specify this and just provide the cae
There was a problem hiding this comment.
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
d2af60e to
07ec8a8
Compare
420a4a8 to
ed5926f
Compare
99cb95b to
27f9144
Compare
9065e85 to
f859951
Compare
f859951 to
4e56401
Compare
📋 Pre-commit Output LogGenerated on Tue Nov 4 10:42:55 UTC 2025 |
Close CES-1339
Depends on #961