Skip to content

Commit

Permalink
Merge pull request #4958 from pallxk/fix-appgw-capacity
Browse files Browse the repository at this point in the history
Update min_capacity and max_capacity of application gateway
  • Loading branch information
tombuildsstuff authored Nov 28, 2019
2 parents 84380c1 + de73cc7 commit d96c892
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_application_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,12 @@ func resourceArmApplicationGateway() *schema.Resource {
"min_capacity": {
Type: schema.TypeInt,
Required: true,
ValidateFunc: validation.IntBetween(2, 10),
ValidateFunc: validation.IntBetween(0, 100),
},
"max_capacity": {
Type: schema.TypeInt,
Optional: true,
ValidateFunc: validation.IntBetween(2, 100),
ValidateFunc: validation.IntBetween(2, 125),
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions azurerm/resource_arm_application_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ func TestAccAzureRMApplicationGateway_autoscaleConfiguration(t *testing.T) {
CheckDestroy: testCheckAzureRMApplicationGatewayDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMApplicationGateway_autoscaleConfiguration(ri, testLocation(), 2, 10),
Config: testAccAzureRMApplicationGateway_autoscaleConfiguration(ri, testLocation(), 0, 10),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMApplicationGatewayExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "sku.0.name", "Standard_v2"),
resource.TestCheckResourceAttr(resourceName, "sku.0.tier", "Standard_v2"),
resource.TestCheckResourceAttr(resourceName, "autoscale_configuration.0.min_capacity", "2"),
resource.TestCheckResourceAttr(resourceName, "autoscale_configuration.0.min_capacity", "0"),
resource.TestCheckResourceAttr(resourceName, "autoscale_configuration.0.max_capacity", "10"),
resource.TestCheckResourceAttr(resourceName, "waf_configuration.#", "0"),
),
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/application_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ A `redirect_configuration` block supports the following:

A `autoscale_configuration` block supports the following:

* `min_capacity` - (Required) Minimum capacity for autoscaling.
* `min_capacity` - (Required) Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`.

* `max_capacity` - (Optional) Maximum capacity for autoscaling.
* `max_capacity` - (Optional) Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`.

---

Expand Down

0 comments on commit d96c892

Please sign in to comment.