From de73cc710d6b6b21e8598153b98940fb740ed8d3 Mon Sep 17 00:00:00 2001 From: pallxk Date: Fri, 22 Nov 2019 15:23:53 +0800 Subject: [PATCH] Update min_capacity and max_capacity of application gateway Reference doc: https://docs.microsoft.com/en-US/azure/application-gateway/application-gateway-autoscaling-zone-redundant#scaling-application-gateway-and-waf-v2 Fix #4722. --- azurerm/resource_arm_application_gateway.go | 4 ++-- azurerm/resource_arm_application_gateway_test.go | 4 ++-- website/docs/r/application_gateway.html.markdown | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index e6e3e1214b4d..43664cf0891b 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -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), }, }, }, diff --git a/azurerm/resource_arm_application_gateway_test.go b/azurerm/resource_arm_application_gateway_test.go index 377e4dec1bba..89f6c329f995 100644 --- a/azurerm/resource_arm_application_gateway_test.go +++ b/azurerm/resource_arm_application_gateway_test.go @@ -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"), ), diff --git a/website/docs/r/application_gateway.html.markdown b/website/docs/r/application_gateway.html.markdown index d66d0335c901..66da54b3efb9 100644 --- a/website/docs/r/application_gateway.html.markdown +++ b/website/docs/r/application_gateway.html.markdown @@ -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`. ---