-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
azurerm_application_gateway - support 125 for V2 sku capacity #5906
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @neil-yechenwei,
Overall this looks with only a couple comments that should be addressed before merge!
@@ -662,7 +662,7 @@ func resourceArmApplicationGateway() *schema.Resource { | |||
"capacity": { | |||
Type: schema.TypeInt, | |||
Optional: true, | |||
ValidateFunc: validation.IntBetween(1, 32), | |||
ValidateFunc: validation.IntBetween(1, 125), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a check to the create/update functions to ensure the 32 limit is respected when not using a V2 SKU?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe adding CustomizeDiff function would be better, right? Please have a look the updated code. Thanks.
@katbyte , Thanks for your comments. I've updated code. Please have a look. |
azurerm/internal/services/network/resource_arm_application_gateway.go
Outdated
Show resolved
Hide resolved
Type: schema.TypeInt, | ||
Optional: true, | ||
ValidateFunc: validation.IntBetween(1, 32), | ||
Type: schema.TypeInt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc's say that this is a required attribute but is optional only if the autoscale_configuration
attribute is set to true
. Do you think we can add an additional check to the CustomizeDiff
to check this condition? I think this may have been overlooked with the initial implementation of this resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your concern is reasonable. I just add the validation in the CustomizeDiff function. Please have a look. Thanks.
@WodansSon , Thanks for your comments. I've updated code. Please have a look. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neil-yechenwei thanks for pushing those changes, this LGTM now! Thanks again! 🚀
This has been released in version 2.1.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.1.0"
}
# ... other configuration ... |
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! |
Issue:
Allow sku.capacity up to 125 when using standard_v2 in the azurerm_application_gateway resource since sku.capacity is limited to 32 currently.
Description:
The Capacity of the SKU to use for this Application Gateway. Possible values for V1 SKU must be between 1 and 32, and for V2 SKU must be between 1 and 125.
SKU Reference doc: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits?toc=%2fazure%2fapplication-gateway%2ftoc.json#application-gateway-limits