hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.63k forks source link

azurerm_application_gateway WAFv2 file_upload_limit_mb max size incorrect #8704

Closed jeffwmiles closed 3 years ago

jeffwmiles commented 4 years ago

Community Note

Terraform (and AzureRM Provider) Version

Terraform v0.12.28
+ provider.azurerm v2.24.0

Affected Resource(s)

Terraform Configuration Files

resource "azurerm_application_gateway" "eau2-appgw" {
  name                = "eastus2-appgw1"
  resource_group_name = azurerm_resource_group.eastus2-rg.name
  location            = azurerm_resource_group.eastus2-rg.location
  enable_http2        = true
  sku {
    name     = "WAF_v2"
    tier     = "WAF_v2"
  }
  autoscale_configuration {
    min_capacity = "0"
    max_capacity = "2"
  }
  waf_configuration {
    firewall_mode            = "Prevention"
    rule_set_type            = "OWASP"
    rule_set_version         = "3.1"
    enabled                  = true
    max_request_body_size_kb = "128"
    file_upload_limit_mb     = "750"
   }
}

Debug Output

Expected Behavior

AzureRM provider should allow a maximum of 750 for this value when sku is WAF v2

Actual Behavior

Error: expected waf_configuration.0.file_upload_limit_mb to be in the range (1 - 500), got 750

Steps to Reproduce

Deploy an Azure Application Gateway with WAF v2 and set the waf_configuration property "file_upload_limit_mb" to a value greater than 500.

References

Property "file_upload_limit_mb" is set to "750" according to maximum size for WAF v2: https://docs.microsoft.com/en-us/azure/web-application-firewall/ag/application-gateway-waf-configuration#waf-request-size-limits

ghost commented 3 years ago

This has been released in version 2.42.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.42.0"
}
# ... other configuration ...
ghost commented 3 years ago

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 πŸ‘‰ hashibot-feedback@hashicorp.com. Thanks!