-
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
ApplicationGatewayWebApplicationFirewallPolicies
expects a lowercase a
starting at version 3.68.0
#23378
Comments
Hi @TMethod , thanks for submitting this issue. After PR #22455, the |
Actually when doing as supposed by @teowa , this results to an always recurring in-pace-upgrade when assigning the policy to the gateway using "azapi_update_resource". Input:resource "azurerm_web_application_firewall_policy" "mypolicy" {
name = "MyFwPolicyName"
resource_group_name = var.resource_group
location =var.location
policy_settings {
enabled = true
mode = "Prevention"
request_body_check = false
file_upload_limit_in_mb = 100
max_request_body_size_in_kb = 128
}
}
resource "azapi_update_resource" "appgw_update" {
type = "Microsoft.Network/applicationGateways@2023-05-01"
resource_id = azurerm_application_gateway.myappgw.id
body = jsonencode({
properties = {
firewallPolicy = {
id : "${azurerm_web_application_firewall_policy.mypolicy.id}"
}
}
})
}
Result (plan) # azapi_update_resource.appgw_azure_ingress will be updated in-place
~ resource "azapi_update_resource" "appgw_azure_ingress" {
~ body = jsonencode(
~ {
~ properties = {
~ firewallPolicy = {
~ id = "/subscriptions/<GUID>/resourceGroups/MyResourceGroup/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/MyFwPolicyName" -> "/subscriptions/<GUID>/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/MyFwPolicyName"
}
# (3 unchanged attributes hidden)
}
}
)
id = "/subscriptions/<GUID>/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGateways/appgw-ingress"
name = "appgw-ingress"
~ output = jsonencode({}) -> (known after apply)
# (5 unchanged attributes hidden)
} The thing is, that the Azure API and in result Therefore my plan always tries to re-apply, when using provider >= 3.68 with the lower case syntax. My current workaround is to use provider < 3.68 and re-import the resource "azurerm_application_gateway" using the capitalized
|
Is there an existing issue for this?
Community Note
Terraform Version
1.5.6
AzureRM Provider Version
3.74.0
Affected Resource(s)/Data Source(s)
azurerm_application_gateway
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
It should not show an error when the
A
inApplicationGatewayWebApplicationFirewallPolicy
is capitalized.This shows as
ApplicationGatewayWebApplicationFirewallPolicy
within the Azure portal. However, azurerm is expecting thea
to be lowercase.I feel like azurerm should be updated to match what is shown in the portal.
Actual Behaviour
Validation error
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: