diff --git a/modules/azure/function_app_linux/main.tf b/modules/azure/function_app_linux/main.tf index 09497b3d..a4d7a5f4 100644 --- a/modules/azure/function_app_linux/main.tf +++ b/modules/azure/function_app_linux/main.tf @@ -70,6 +70,14 @@ resource "azurerm_linux_function_app" "function_app" { identity { type = "SystemAssigned" } + + /* + * VNet integration is set by a separate resource 'vnet_integration' below, so this must be ignored, see 'NOTE on regional virtual network integration:' here + * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app + */ + lifecycle { + ignore_changes = [virtual_network_subnet_id] + } } # VNet integration diff --git a/modules/azure/function_app_linux_managed_identity/main.tf b/modules/azure/function_app_linux_managed_identity/main.tf index d767d27e..ef8f7de1 100644 --- a/modules/azure/function_app_linux_managed_identity/main.tf +++ b/modules/azure/function_app_linux_managed_identity/main.tf @@ -94,6 +94,14 @@ resource "azurerm_linux_function_app" "function_app" { identity { type = "SystemAssigned" } + + /* + * VNet integration is set by a separate resource 'vnet_integration' below, so this must be ignored, see 'NOTE on regional virtual network integration:' here + * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app + */ + lifecycle { + ignore_changes = [virtual_network_subnet_id] + } } diff --git a/modules/azure/function_app_windows/main.tf b/modules/azure/function_app_windows/main.tf index a7f4c485..1dbccea0 100644 --- a/modules/azure/function_app_windows/main.tf +++ b/modules/azure/function_app_windows/main.tf @@ -70,6 +70,14 @@ resource "azurerm_windows_function_app" "function_app" { identity { type = "SystemAssigned" } + + /* + * VNet integration is set by a separate resource below, so this must be ignored, see 'NOTE on regional virtual network integration:' here + * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_function_app + */ + lifecycle { + ignore_changes = [virtual_network_subnet_id] + } } # Host keys