Skip to content
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

Merged
merged 8 commits into from
Mar 2, 2020

Conversation

neil-yechenwei
Copy link
Contributor

@neil-yechenwei neil-yechenwei commented Feb 26, 2020

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

@ghost ghost added size/M and removed size/XS labels Feb 26, 2020
@katbyte katbyte changed the title Expand sku capacity for azurerm_application_gateway azurerm_application_gateway - support 125 for V2 sku capacity Feb 26, 2020
Copy link
Collaborator

@katbyte katbyte left a 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),
Copy link
Collaborator

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?

Copy link
Contributor Author

@neil-yechenwei neil-yechenwei Feb 27, 2020

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.

website/docs/r/application_gateway.html.markdown Outdated Show resolved Hide resolved
@katbyte katbyte added this to the v2.1.0 milestone Feb 26, 2020
@neil-yechenwei
Copy link
Contributor Author

@katbyte , Thanks for your comments. I've updated code. Please have a look.

@ghost ghost removed the waiting-response label Feb 27, 2020
Type: schema.TypeInt,
Optional: true,
ValidateFunc: validation.IntBetween(1, 32),
Type: schema.TypeInt,
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@neil-yechenwei
Copy link
Contributor Author

@WodansSon , Thanks for your comments. I've updated code. Please have a look. Thanks.

@ghost ghost removed the waiting-response label Feb 27, 2020
Copy link
Collaborator

@WodansSon WodansSon left a 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! 🚀

@WodansSon
Copy link
Collaborator

The one test that failed was due to a deprecated attribute as part of 2.0.
image

@WodansSon
Copy link
Collaborator

image

@WodansSon WodansSon merged commit aef86be into hashicorp:master Mar 2, 2020
WodansSon added a commit that referenced this pull request Mar 2, 2020
WodansSon added a commit that referenced this pull request Mar 2, 2020
@ghost
Copy link

ghost commented Mar 11, 2020

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 ...

@ghost
Copy link

ghost commented Apr 2, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants