-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Application Gateway autoscaling #2603
Comments
I was able to modify the provider to check for 0-10 and it seemed to solve the error, if this is an acceptable solution, I can submit the pull request. This does, however, break validation for non-v2 sku's since they must be greater than zero. Perhaps some kind of custom validation based on the sku is needed? Upon further debugging, this seems to be a deeper issue of not being able to select auto-scaling, not just a capacity of 0. I tried to apply a "0" capacity after updating the plugin, and received a azure validation error: * azurerm_application_gateway.APPGW_01: Error Creating/Updating Application Gateway "APPGW-01" (Resource Group "terraform_appgw_test"): network.ApplicationGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="ApplicationGatewaySkuCapacityNotValid" Message="Sku Capacity 0 specified for Sku Tier Standard_v2 is not valid. Valid value is in the range of [1-200]" Details=[] |
I think this bug report may need to be closed in favor of a feature request to support auto-scaling feature of application gateway v2. |
Hi @dmaltsiniotis, Thanks for opening this issue, it does appear that some changes will be required. Looking at the documentation it seems that when you configure auto scaling you don't set that capacity on the sku, but add a new min capacity parameter: $autoscaleConfig = New-AzureRmApplicationGatewayAutoscaleConfiguration -MinCapacity 2
$sku = New-AzureRmApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 So to use autoscaling capacity becomes min capacity and is placed elsewhere. Ideally a new property We can keep this issue and i've renamed it to reflect as such 🙂 |
PR up: #3353 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.11
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/dmaltsiniotis/9d2259808586c081ea46c790999ba481
Panic Output
N/A
Expected Behavior
The application gateway validation should pass, and provision normally.
Actual Behavior
The following error is observed when trying to run a plan:
Error: azurerm_application_gateway.APPGW_01: expected sku.0.capacity to be in the range (1 - 10), got 0
Steps to Reproduce
Important Factoids
Azure application gateway v2's are very new and behave differently from standard gateways. Even the azure web portal does not yet have all the configuration options for the v2 gateways. This may necessitate a significant change to the validation logic for application gateways.
When setting the scaling to "automatic" in azure for a v2 application gateway, it's pulled back as having capacity zero by the azurerm provider for exiting resources.
References
Here is the PR originally adding the SKU's, but not adjusting the capacity validation:
The text was updated successfully, but these errors were encountered: