Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,095 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure function networking (Site access and rules) (Advanced tool site) setting Unmatched rule action to Deny. Unable to find setting in Terraform to set to Deny.
Hi @Faisal Qazi
I'm not sure if you came across https://learn.microsoft.com/en-us/answers/questions/1242936/how-to-set-advanced-tool-site-access-restrictions; but you should be able to use the scm_ip_restriction
block within the azurerm_function_app
.
Here's an example Terraform configuration:
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "East US"
}
resource "azurerm_function_app" "example" {
name = "example-function-app"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
storage_account_name = azurerm_storage_account.example.name
storage_account_access_key = azurerm_storage_account.example.primary_access_key
site_config {
scm_ip_restriction {
ip_address = "10.0.1.0/24"
action = "Deny"
}
}
}