We are experinging an issue when we try and use the scm_use_main_ip_restriction option in the siteconfig for azurerm_function_app, when we run terraform plan this fails with.
Error: Unsupported argument
in resource "azurerm_function_app" "functionapp-proxy":
57: scm_use_main_ip_restriction = true
An argument named "scm_use_main_ip_restriction" is not expected here.
Terraform (and AzureRM Provider) Version
Terraform version 0.13.5
AzureRM 2.34.0
Affected Resource(s)
azurerm_function_app
Terraform Configuration Files
resource "azurerm_function_app" "functionapp-proxy" {
name = "${var.system_name}-proxy"
location = azurerm_resource_group.functionapprg.location
resource_group_name = azurerm_resource_group.functionapprg.name
app_service_plan_id = azurerm_app_service_plan.appserviecplan.id
storage_account_name = var.storageaccount
storage_account_access_key = var.storageaccountkey
version = "~2"
site_config {
min_tls_version = 1.2
dynamic "ip_restriction" {
for_each = var.iprangeslist
content {
ip_address = ip_restriction.ipaddress
}
}
scm_use_main_ip_restriction = true
}
Expected Behavior
Terraform Plan to complete
Actual Behavior
terraform plan fails with
An argument named "scm_use_main_ip_restriction" is not expected here.
Steps to Reproduce
terraform init
terraform plan