From e17f1aad9c30d1f4b21a8a5ba56598fb04dcdbf9 Mon Sep 17 00:00:00 2001 From: xiaxin18 Date: Mon, 6 Feb 2023 18:34:04 +0800 Subject: [PATCH 1/2] update ip restriction issues for function and web app --- .../appservice/helpers/shared_schema.go | 28 +++++++++++++++---- .../docs/r/linux_function_app.html.markdown | 2 ++ .../r/linux_function_app_slot.html.markdown | 2 ++ website/docs/r/linux_web_app.html.markdown | 2 ++ .../docs/r/linux_web_app_slot.html.markdown | 2 ++ .../docs/r/windows_function_app.html.markdown | 2 ++ .../r/windows_function_app_slot.html.markdown | 2 ++ website/docs/r/windows_web_app.html.markdown | 2 ++ .../docs/r/windows_web_app_slot.html.markdown | 2 ++ 9 files changed, 39 insertions(+), 5 deletions(-) diff --git a/internal/services/appservice/helpers/shared_schema.go b/internal/services/appservice/helpers/shared_schema.go index 9e2e0c7f54a3..6d279b8f7153 100644 --- a/internal/services/appservice/helpers/shared_schema.go +++ b/internal/services/appservice/helpers/shared_schema.go @@ -13,6 +13,15 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/utils" ) +const ( + ipRestrictionLowestPriority int32 = 2147483647 + ipRestrictionAllowAllName string = "Allow all" + ipRestrictionDenyAllName string = "Deny all" + ipRestrictionAllowAllAction string = "Allow" + ipRestrictionDenyAllAction string = "Deny" + ipRestrictionDefaultIpAddressRange string = "Any" +) + type IpRestriction struct { IpAddress string `tfschema:"ip_address"` ServiceTag string `tfschema:"service_tag"` @@ -50,7 +59,6 @@ func IpRestrictionSchema() *pluginsdk.Schema { return &pluginsdk.Schema{ Type: pluginsdk.TypeList, Optional: true, - Computed: true, ConfigMode: pluginsdk.SchemaConfigModeAttr, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ @@ -1098,6 +1106,12 @@ func GithubAuthSettingsSchemaComputed() *pluginsdk.Schema { func ExpandIpRestrictions(restrictions []IpRestriction) (*[]web.IPSecurityRestriction, error) { var expanded []web.IPSecurityRestriction if len(restrictions) == 0 { + expanded = append(expanded, web.IPSecurityRestriction{ + Name: utils.String(ipRestrictionAllowAllName), + Priority: utils.Int32(ipRestrictionLowestPriority), + IPAddress: utils.String(ipRestrictionDefaultIpAddressRange), + Action: utils.String(ipRestrictionAllowAllAction), + }) return &expanded, nil } @@ -1454,13 +1468,17 @@ func FlattenIpRestrictions(ipRestrictionsList *[]web.IPSecurityRestriction) []Ip if v.Name != nil { ipRestriction.Name = *v.Name - } - - if v.IPAddress != nil { - if *v.IPAddress == "Any" { + if *v.Name == ipRestrictionAllowAllName && *v.IPAddress == ipRestrictionDefaultIpAddressRange && + *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionAllowAllName { continue } + if *v.Name == ipRestrictionDenyAllName && *v.IPAddress == ipRestrictionDefaultIpAddressRange && + *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionDenyAllName { + continue + } + } + if v.IPAddress != nil { if v.Tag == web.IPFilterTagServiceTag { ipRestriction.ServiceTag = *v.IPAddress } else { diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index 3bdb0aa3d9d8..ed87e63fca56 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -338,6 +338,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `microsoft` block supports the following: diff --git a/website/docs/r/linux_function_app_slot.html.markdown b/website/docs/r/linux_function_app_slot.html.markdown index 42b81bb46e72..3af5a5442fee 100644 --- a/website/docs/r/linux_function_app_slot.html.markdown +++ b/website/docs/r/linux_function_app_slot.html.markdown @@ -464,6 +464,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `scm_ip_restriction` block supports the following: diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index 5b764a9592e9..2a4d81fd6868 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -355,6 +355,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `logs` block supports the following: diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index 16f369840015..ec8cdd81a110 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -358,6 +358,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `logs` block supports the following: diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 13fec12cca9d..83e4d1792084 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -318,6 +318,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `microsoft` block supports the following: diff --git a/website/docs/r/windows_function_app_slot.html.markdown b/website/docs/r/windows_function_app_slot.html.markdown index 89f009d8c6b6..0cadeb214f4e 100644 --- a/website/docs/r/windows_function_app_slot.html.markdown +++ b/website/docs/r/windows_function_app_slot.html.markdown @@ -423,6 +423,8 @@ An `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `scm_ip_restriction` block supports the following: diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index ec6f0e9188e6..94668018fe67 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -374,6 +374,8 @@ A `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `logs` block supports the following: diff --git a/website/docs/r/windows_web_app_slot.html.markdown b/website/docs/r/windows_web_app_slot.html.markdown index 58bbc1552e4f..9b2b9e6b2826 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -372,6 +372,8 @@ A `ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `logs` block supports the following: From c81b473b0da8d569c7e62e1311fe8bb89bdaec9f Mon Sep 17 00:00:00 2001 From: xiaxin18 Date: Tue, 7 Feb 2023 11:11:14 +0800 Subject: [PATCH 2/2] update scm ip --- .../appservice/helpers/shared_schema.go | 27 +++++++++++++++++-- .../linux_function_app_resource_test.go | 18 +++++++------ .../linux_function_app_slot_resource_test.go | 18 +++++++------ .../appservice/linux_web_app_resource_test.go | 9 ++++--- .../linux_web_app_slot_resource_test.go | 9 ++++--- .../windows_function_app_resource_test.go | 18 +++++++------ ...windows_function_app_slot_resource_test.go | 18 +++++++------ .../windows_web_app_resource_test.go | 9 ++++--- .../windows_web_app_slot_resource_test.go | 9 ++++--- .../docs/r/linux_function_app.html.markdown | 4 +++ .../r/linux_function_app_slot.html.markdown | 4 +++ website/docs/r/linux_web_app.html.markdown | 4 +++ .../docs/r/linux_web_app_slot.html.markdown | 4 +++ .../docs/r/windows_function_app.html.markdown | 4 +++ .../r/windows_function_app_slot.html.markdown | 4 +++ website/docs/r/windows_web_app.html.markdown | 6 +++++ .../docs/r/windows_web_app_slot.html.markdown | 4 +++ 17 files changed, 119 insertions(+), 50 deletions(-) diff --git a/internal/services/appservice/helpers/shared_schema.go b/internal/services/appservice/helpers/shared_schema.go index 6d279b8f7153..527380b962c0 100644 --- a/internal/services/appservice/helpers/shared_schema.go +++ b/internal/services/appservice/helpers/shared_schema.go @@ -27,6 +27,7 @@ type IpRestriction struct { ServiceTag string `tfschema:"service_tag"` VnetSubnetId string `tfschema:"virtual_network_subnet_id"` Name string `tfschema:"name"` + Description string `tfschema:"description"` Priority int `tfschema:"priority"` Action string `tfschema:"action"` Headers []IpRestrictionHeaders `tfschema:"headers"` @@ -91,6 +92,14 @@ func IpRestrictionSchema() *pluginsdk.Schema { Description: "The name which should be used for this `ip_restriction`.", }, + "description": { + Type: pluginsdk.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringIsNotEmpty, + Description: "The rule description of this IP Restriction.", + }, + "priority": { Type: pluginsdk.TypeInt, Optional: true, @@ -147,6 +156,12 @@ func IpRestrictionSchemaComputed() *pluginsdk.Schema { Description: "The name used for this `ip_restriction`.", }, + "description": { + Type: pluginsdk.TypeString, + Computed: true, + Description: "The description of this IP Restriction", + }, + "priority": { Type: pluginsdk.TypeInt, Computed: true, @@ -1125,6 +1140,10 @@ func ExpandIpRestrictions(restrictions []IpRestriction) (*[]web.IPSecurityRestri restriction.Name = utils.String(v.Name) } + if v.Description != "" { + restriction.Description = utils.String(v.Description) + } + if v.IpAddress != "" { restriction.IPAddress = utils.String(v.IpAddress) } @@ -1469,15 +1488,19 @@ func FlattenIpRestrictions(ipRestrictionsList *[]web.IPSecurityRestriction) []Ip if v.Name != nil { ipRestriction.Name = *v.Name if *v.Name == ipRestrictionAllowAllName && *v.IPAddress == ipRestrictionDefaultIpAddressRange && - *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionAllowAllName { + *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionAllowAllAction { continue } if *v.Name == ipRestrictionDenyAllName && *v.IPAddress == ipRestrictionDefaultIpAddressRange && - *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionDenyAllName { + *v.Priority == ipRestrictionLowestPriority && *v.Action == ipRestrictionDenyAllAction { continue } } + if v.Description != nil { + ipRestriction.Description = *v.Description + } + if v.IPAddress != nil { if v.Tag == web.IPFilterTagServiceTag { ipRestriction.ServiceTag = *v.IPAddress diff --git a/internal/services/appservice/linux_function_app_resource_test.go b/internal/services/appservice/linux_function_app_resource_test.go index f1c44af75057..5244a9b3be28 100644 --- a/internal/services/appservice/linux_function_app_resource_test.go +++ b/internal/services/appservice/linux_function_app_resource_test.go @@ -1564,10 +1564,11 @@ resource "azurerm_linux_function_app" "test" { site_config { ip_restriction { - ip_address = "13.107.6.152/31,13.107.128.0/22" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "13.107.6.152/31,13.107.128.0/22" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] @@ -2749,10 +2750,11 @@ resource "azurerm_linux_function_app" "test" { remote_debugging_version = "VS2017" scm_ip_restriction { - ip_address = "10.20.20.20/32" - name = "test-scm-restriction" - priority = 123 - action = "Allow" + ip_address = "10.20.20.20/32" + name = "test-scm-restriction" + description = "tftestscmipdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go index 00b4ce212a54..f7e7bcf8a842 100644 --- a/internal/services/appservice/linux_function_app_slot_resource_test.go +++ b/internal/services/appservice/linux_function_app_slot_resource_test.go @@ -1952,10 +1952,11 @@ resource "azurerm_linux_function_app_slot" "test" { http2_enabled = true ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] @@ -1968,10 +1969,11 @@ resource "azurerm_linux_function_app_slot" "test" { remote_debugging_version = "VS2022" scm_ip_restriction { - ip_address = "10.20.20.20/32" - name = "test-scm-restriction" - priority = 123 - action = "Allow" + ip_address = "10.20.20.20/32" + name = "test-scm-restriction" + description = "tftestscmipdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/linux_web_app_resource_test.go b/internal/services/appservice/linux_web_app_resource_test.go index 4a6248c93fbe..d5d321b02a0f 100644 --- a/internal/services/appservice/linux_web_app_resource_test.go +++ b/internal/services/appservice/linux_web_app_resource_test.go @@ -2131,10 +2131,11 @@ resource "azurerm_linux_web_app" "test" { site_config { ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/linux_web_app_slot_resource_test.go b/internal/services/appservice/linux_web_app_slot_resource_test.go index 07f7e979c1eb..e48b11aa3b9e 100644 --- a/internal/services/appservice/linux_web_app_slot_resource_test.go +++ b/internal/services/appservice/linux_web_app_slot_resource_test.go @@ -1709,10 +1709,11 @@ resource "azurerm_linux_web_app_slot" "test" { site_config { ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/windows_function_app_resource_test.go b/internal/services/appservice/windows_function_app_resource_test.go index d01a94e3ebd5..8f62cf6cb878 100644 --- a/internal/services/appservice/windows_function_app_resource_test.go +++ b/internal/services/appservice/windows_function_app_resource_test.go @@ -1843,10 +1843,11 @@ resource "azurerm_windows_function_app" "test" { http2_enabled = true ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] @@ -1867,10 +1868,11 @@ resource "azurerm_windows_function_app" "test" { remote_debugging_version = "VS2022" scm_ip_restriction { - ip_address = "10.20.20.20/32" - name = "test-scm-restriction" - priority = 123 - action = "Allow" + ip_address = "10.20.20.20/32" + name = "test-scm-restriction" + description = "tftestscmipdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/windows_function_app_slot_resource_test.go b/internal/services/appservice/windows_function_app_slot_resource_test.go index 8b47c82fa189..3c1fb7b2426d 100644 --- a/internal/services/appservice/windows_function_app_slot_resource_test.go +++ b/internal/services/appservice/windows_function_app_slot_resource_test.go @@ -1189,10 +1189,11 @@ resource "azurerm_windows_function_app_slot" "test" { site_config { ip_restriction { - ip_address = "13.107.6.152/31,13.107.128.0/22" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "13.107.6.152/31,13.107.128.0/22" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] @@ -1440,10 +1441,11 @@ resource "azurerm_windows_function_app_slot" "test" { remote_debugging_version = "VS2022" scm_ip_restriction { - ip_address = "10.20.20.20/32" - name = "test-scm-restriction" - priority = 123 - action = "Allow" + ip_address = "10.20.20.20/32" + name = "test-scm-restriction" + description = "tftestscmipdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/windows_web_app_resource_test.go b/internal/services/appservice/windows_web_app_resource_test.go index eeb0f5ae363a..afab142e1abb 100644 --- a/internal/services/appservice/windows_web_app_resource_test.go +++ b/internal/services/appservice/windows_web_app_resource_test.go @@ -1733,10 +1733,11 @@ resource "azurerm_windows_web_app" "test" { site_config { ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/internal/services/appservice/windows_web_app_slot_resource_test.go b/internal/services/appservice/windows_web_app_slot_resource_test.go index 4b8fcdec9cf7..6bd3145d9e1e 100644 --- a/internal/services/appservice/windows_web_app_slot_resource_test.go +++ b/internal/services/appservice/windows_web_app_slot_resource_test.go @@ -1495,10 +1495,11 @@ resource "azurerm_windows_web_app_slot" "test" { site_config { ip_restriction { - ip_address = "10.10.10.10/32" - name = "test-restriction" - priority = 123 - action = "Allow" + ip_address = "10.10.10.10/32" + name = "test-restriction" + description = "tftestdescription" + priority = 123 + action = "Allow" headers { x_azure_fdid = ["55ce4ed1-4b06-4bf1-b40e-4638452104da"] x_fd_health_probe = ["1"] diff --git a/website/docs/r/linux_function_app.html.markdown b/website/docs/r/linux_function_app.html.markdown index ed87e63fca56..bae79c806d81 100644 --- a/website/docs/r/linux_function_app.html.markdown +++ b/website/docs/r/linux_function_app.html.markdown @@ -330,6 +330,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -388,6 +390,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: diff --git a/website/docs/r/linux_function_app_slot.html.markdown b/website/docs/r/linux_function_app_slot.html.markdown index 3af5a5442fee..0ed2240112b0 100644 --- a/website/docs/r/linux_function_app_slot.html.markdown +++ b/website/docs/r/linux_function_app_slot.html.markdown @@ -456,6 +456,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -486,6 +488,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `storage_account` block supports the following: diff --git a/website/docs/r/linux_web_app.html.markdown b/website/docs/r/linux_web_app.html.markdown index 2a4d81fd6868..dd436a736544 100644 --- a/website/docs/r/linux_web_app.html.markdown +++ b/website/docs/r/linux_web_app.html.markdown @@ -347,6 +347,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -425,6 +427,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: diff --git a/website/docs/r/linux_web_app_slot.html.markdown b/website/docs/r/linux_web_app_slot.html.markdown index ec8cdd81a110..6dd594acaaad 100644 --- a/website/docs/r/linux_web_app_slot.html.markdown +++ b/website/docs/r/linux_web_app_slot.html.markdown @@ -350,6 +350,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -428,6 +430,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: diff --git a/website/docs/r/windows_function_app.html.markdown b/website/docs/r/windows_function_app.html.markdown index 83e4d1792084..fa8ccd98a9d4 100644 --- a/website/docs/r/windows_function_app.html.markdown +++ b/website/docs/r/windows_function_app.html.markdown @@ -310,6 +310,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -368,6 +370,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: diff --git a/website/docs/r/windows_function_app_slot.html.markdown b/website/docs/r/windows_function_app_slot.html.markdown index 0cadeb214f4e..acb7f60ea63c 100644 --- a/website/docs/r/windows_function_app_slot.html.markdown +++ b/website/docs/r/windows_function_app_slot.html.markdown @@ -415,6 +415,8 @@ An `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -445,6 +447,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** Exactly one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `headers` block supports the following: diff --git a/website/docs/r/windows_web_app.html.markdown b/website/docs/r/windows_web_app.html.markdown index 94668018fe67..6c63221a6a29 100644 --- a/website/docs/r/windows_web_app.html.markdown +++ b/website/docs/r/windows_web_app.html.markdown @@ -366,6 +366,8 @@ A `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -436,6 +438,8 @@ A `scm_ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -444,6 +448,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: diff --git a/website/docs/r/windows_web_app_slot.html.markdown b/website/docs/r/windows_web_app_slot.html.markdown index 9b2b9e6b2826..7f03af3f70b7 100644 --- a/website/docs/r/windows_web_app_slot.html.markdown +++ b/website/docs/r/windows_web_app_slot.html.markdown @@ -364,6 +364,8 @@ A `ip_restriction` block supports the following: * `name` - (Optional) The name which should be used for this `ip_restriction`. +* `description` - (Optional) The description of this `ip_restriction`. + * `priority` - (Optional) The priority value of this `ip_restriction`. Defaults to `65000`. * `service_tag` - (Optional) The Service Tag used for this IP Restriction. @@ -442,6 +444,8 @@ A `scm_ip_restriction` block supports the following: ~> **NOTE:** One and only one of `ip_address`, `service_tag` or `virtual_network_subnet_id` must be specified. +~> **NOTE:** The default value set for `scm_ip_restriction` that allowing all ip addresses will be added with the lowest priority 2147483647 if the block isn't specified by users. + --- A `site_config` block supports the following: