Skip to content

Commit

Permalink
docs update, lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops committed Jul 29, 2020
1 parent 3ec960f commit 59c6cab
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
4 changes: 2 additions & 2 deletions azurerm/internal/services/web/app_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/app_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
36 changes: 33 additions & 3 deletions website/docs/r/function_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 59c6cab

Please sign in to comment.