From 59c6cab13d2ad52618776c350ce50f347dd2f33e Mon Sep 17 00:00:00 2001 From: jackofallops Date: Wed, 29 Jul 2020 08:15:33 +0100 Subject: [PATCH] docs update, lint fixes --- azurerm/internal/services/web/app_service.go | 4 +-- website/docs/r/app_service.html.markdown | 2 -- website/docs/r/function_app.html.markdown | 36 ++++++++++++++++++-- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/azurerm/internal/services/web/app_service.go b/azurerm/internal/services/web/app_service.go index ed919e68a579..841cc3e53fa0 100644 --- a/azurerm/internal/services/web/app_service.go +++ b/azurerm/internal/services/web/app_service.go @@ -1882,11 +1882,11 @@ func expandAppServiceIpRestriction(input interface{}) ([]web.IPSecurityRestricti action := restriction["action"].(string) if vNetSubnetID != "" && ipAddress != "" { - return nil, fmt.Errorf(fmt.Sprintf("only one of `ip_address` or `virtual_network_subnet_id` can be set for an IP restriction")) + return nil, fmt.Errorf("only one of `ip_address` or `virtual_network_subnet_id` can be set for an IP restriction") } if vNetSubnetID == "" && ipAddress == "" { - return nil, fmt.Errorf(fmt.Sprintf("one of `ip_address` or `virtual_network_subnet_id` must be set for an IP restriction")) + return nil, fmt.Errorf("one of `ip_address` or `virtual_network_subnet_id` must be set for an IP restriction") } ipSecurityRestriction := web.IPSecurityRestriction{} diff --git a/website/docs/r/app_service.html.markdown b/website/docs/r/app_service.html.markdown index a676c615524b..20788bde47d6 100644 --- a/website/docs/r/app_service.html.markdown +++ b/website/docs/r/app_service.html.markdown @@ -333,8 +333,6 @@ A `ip_restriction` block supports the following: --- ---- - A `scm_ip_restriction` block supports the following: * `ip_address` - (Optional) The IP Address used for this IP Restriction in CIDR notation. diff --git a/website/docs/r/function_app.html.markdown b/website/docs/r/function_app.html.markdown index e25de334087c..c746ec6987ca 100644 --- a/website/docs/r/function_app.html.markdown +++ b/website/docs/r/function_app.html.markdown @@ -206,6 +206,14 @@ The following arguments are supported: -> **NOTE** User has to explicitly set `ip_restriction` to empty slice (`[]`) to remove it. +* `scm_use_main_ip_restriction` - (Optional) IP security restrictions for scm to use main. Defaults to false. + +-> **NOTE** Any `scm_ip_restriction` blocks configured are ignored by the service when `scm_use_main_ip_restriction` is set to `true`. Any scm restrictions will become active if this is subsequently set to `false` or removed. + +* `scm_ip_restriction` - (Optional) A [List of objects](/docs/configuration/attr-as-blocks.html) representing ip restrictions as defined below. + +-> **NOTE** User has to explicitly set `scm_ip_restriction` to empty slice (`[]`) to remove it. + --- A `cors` block supports the following: @@ -302,11 +310,33 @@ A `microsoft` block supports the following: A `ip_restriction` block supports the following: -* `ip_address` - (Optional) The IP Address CIDR notation used for this IP Restriction. +* `ip_address` - (Optional) The IP Address used for this IP Restriction in CIDR notation. + +* `virtual_network_subnet_id` - (Optional) The Virtual Network Subnet ID used for this IP Restriction. + +-> **NOTE:** One of either `ip_address` or `virtual_network_subnet_id` must be specified + +* `name` - (Optional) The name for this IP Restriction. + +* `priority` - (Optional) The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified. + +* `action` - (Optional) Does this restriction `Allow` or `Deny` access for this IP range. Defaults to `Allow`. + +--- + +A `scm_ip_restriction` block supports the following: + +* `ip_address` - (Optional) The IP Address used for this IP Restriction in CIDR notation. + +* `virtual_network_subnet_id` - (Optional) The Virtual Network Subnet ID used for this IP Restriction. + +-> **NOTE:** One of either `ip_address` or `virtual_network_subnet_id` must be specified + +* `name` - (Optional) The name for this IP Restriction. -* `subnet_id` - (Optional) The Subnet ID used for this IP Restriction. +* `priority` - (Optional) The priority for this IP Restriction. Restrictions are enforced in priority order. By default, priority is set to 65000 if not specified. --> **NOTE:** One of either `ip_address` or `subnet_id` must be specified +* `action` - (Optional) Allow or Deny access for this IP range. Defaults to Allow. ## Attributes Reference