Azure / Azure/terraform-provider-azapi
Container App ignores `kind=functionapp` when using api-version `2025-07-01`
- Dominant language
- Go
- Stars
- 244
- Forks
- 97
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
I am using `azapi` provider to create function apps over Container Apps, as `azurerm` does not support the property `kind=functionapp` yet.
This approach works properly, unless I set the api-version `2025-07-01`. If I rollback it to `2025-02-02-preview` - which actually introduced the `kind` property - it works as expected.
Not the property `kind` [is not deprecated](https://learn.microsoft.com/en-us/azure/container-apps/functions-overview), and it works from both Portal and az cli.
Code:
```hcl
resource "azapi_resource" "this" {
count = local.is_function_app ? 1 : 0
type = "Microsoft.App/containerApps@2025-07-01" # or 2025-02-02-preview
name = local.function_app.name
parent_id = local.resource_group_id
location = var.location
identity {
type = "SystemAssigned, UserAssigned"
identity_ids = [
var.user_assigned_identity_id
]
}
body = {
kind = "functionapp"
properties = {
environmentId = var.container_app_environment_id
...
}
}
tags = var.tags
lifecycle {
ignore_changes = [
# The image is not managed by Terraform, but instead updated by CD pipelines
body.properties.template.containers[0].image
]
}
schema_validation_enabled = false
response_export_values = [
"*"
]
}
```
As result, the Container App is not recognized as Function:
azapi v2.7
Contributor guide
Research direction
Start by reproducing the provided azapi_resource configuration with api-version 2025-07-01 and 2025-02-02-preview, then compare the resulting Container App responses and provider behavior. Done means the newer API version preserves kind=functionapp so the resource is recognized as a Function App.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go, terraform
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100