Is there an existing issue for this?
Community Note
- Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Terraform Bug Report: Issues with azurerm_function_app_flex_consumption
Issues Encountered
Incorrect Storage Container Endpoint Configuration
The storage_container_endpoint is incorrectly configured, causing an error when deploying, however this example works ${azurerm_storage_account.example.primary_blob_endpoint}/example-flexcontainer
Storage Account Name Length Exceeds Limit
The example uses azurerm_storage_account with the name examplelinuxfunctionappsa, which exceeds the character limit for storage account names.
Missing Attribute
The service_plan_id and site_config attribute is missing, which is required for proper configuration.
https_only Configuration Error
Setting https_only throws an error indicating it is not supported, although it should be supported. There is allready a bug for this. #29000
storage_authentication_type Issue
When setting storage_authentication_type to systemassignedidentity and it is deployed to azure functions, functions do not work. However, this setting works when configured via the Azure client.
location
Is set to West Europe, which is not provided by azure for flex consumption plan
Terraform Version
1.11.1
AzureRM Provider Version
4.21.1
Affected Resource(s)/Data Source(s)
azurerm_function_app_flex_consumption
Terraform Configuration Files
resource "azurerm_function_app_flex_consumption" "function_app_flex" {
name = "${var.project_name}-${var.environment}-flex-function-app"
service_plan_id = azurerm_service_plan.service_plan.id
resource_group_name = data.azurerm_resource_group.resource_group.name
location = "northeurope"
storage_container_type = "blobContainer"
storage_container_endpoint = "${azurerm_storage_account.example.primary_blob_endpoint}deployment-package"
storage_authentication_type = "StorageAccountConnectionString" # system assigned managed
storage_access_key = azurerm_storage_account.storage_account_function_app_flex.primary_access_key
runtime_name = "dotnet-isolated"
runtime_version = "8.0"
maximum_instance_count = 100
instance_memory_in_mb = 2048
tags = local.tags
virtual_network_subnet_id = azurerm_subnet.example.id
identity {
type = "SystemAssigned"
}
site_config {
}
}
Debug Output/Panic Output
Expected Behaviour
No response
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response
Is there an existing issue for this?
Community Note
Terraform Bug Report: Issues with
azurerm_function_app_flex_consumptionIssues Encountered
Incorrect Storage Container Endpoint Configuration
The
storage_container_endpointis incorrectly configured, causing an error when deploying, however this example works${azurerm_storage_account.example.primary_blob_endpoint}/example-flexcontainerStorage Account Name Length Exceeds Limit
The example uses azurerm_storage_account with the name examplelinuxfunctionappsa, which exceeds the character limit for storage account names.
Missing Attribute
The service_plan_id and site_config attribute is missing, which is required for proper configuration.
https_only Configuration Error
Setting https_only throws an error indicating it is not supported, although it should be supported. There is allready a bug for this. #29000
storage_authentication_type Issue
When setting storage_authentication_type to systemassignedidentity and it is deployed to azure functions, functions do not work. However, this setting works when configured via the Azure client.
location
Is set to West Europe, which is not provided by azure for flex consumption plan
Terraform Version
1.11.1
AzureRM Provider Version
4.21.1
Affected Resource(s)/Data Source(s)
azurerm_function_app_flex_consumption
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
No response
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response