As an example, let’s say I rolled out an azurerm_linux_function_app
with the following spec:
resource "azurerm_linux_function_app" "example" {
name = var.cluster_name
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
storage_account_name = azurerm_storage_account.example.name
storage_account_access_key = azurerm_storage_account.example.primary_access_key
service_plan_id = azurerm_service_plan.example.id
identity {
type = "SystemAssigned"
}
app_settings = {
"ServiceBusConnection__fullyQualifiedNamespace" = "${local.service_bus_namespace}.servicebus.windows.net"
}
site_config {
application_stack {
python_version = "3.9"
}
}
}
If I navigate to “App files” on the resource in the Azure Portal, I can see that the following host.json has been created:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
}
I don’t see any mention of this anywhere in the tf state though. I need to change this to the following so that I can use a service bus bindinf with a managed identity:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}
How can I set this using the azurerm terraform provider?
The only field I can find that remotely appears to deal with this is functions_extension_version
, but changing this does not appear to have any affect that I can see. It is in any case by default "~4"
, so I would not expect that to lead to "version": "[2.*, 3.0.0)"
to begin with.