-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
az network firewall policy update: (FirewallPolicyPremiumOnlyProperties) error on standard policy #4096
Comments
network |
Please create policy with |
I feel you misunderstood or misread what I wrote. I was updating an existing standard sku policy and at no point did I set identity myself, this was inserted by the az cli network firewall update command. It is easily reproduced: or
(Omiting the preview parameter --sku will create a standard policy anyway) Next try to change the 'threat-intel-mode' with: 'az network firewall policy update -n test-policy -g Group --threat-intel-mode Deny' This will result in the error message: '(FirewallPolicyPremiumOnlyProperties) Firewall Policy c7f3f29b-9c8d-4cd0-bd6c-67362034c959 contains premium only properties - Identity At no point did I set Identity or any other Premium sku option. Using 'create' again to change the property value does work:
If I run both with debug mode on, you can see that the 'update' command inserts the arbitrary "identity": {"type": "None"} while create does not. 'az network firewall policy create -n test-policy -g Group-l westeurope --sku Standard --threat-intel-mode Alert': cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<snip>/resourceGroups/Shared/providers/Microsoft.Network/firewallPolicies/test-policy?api-version=2020-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '69'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '74864183-437e-11ec-bb29-ec5c68a2077a'
cli.azure.cli.core.sdk.policies: 'CommandName': 'network firewall policy create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-n -g -l --threat-intel-mode --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.30.0 (MSI) azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.22000-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "westeurope", "properties": {"threatIntelMode": "Deny"}} 'az network firewall policy update -n test-policy -g Group --threat-intel-mode Deny': cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<snip>/resourceGroups/Shared/providers/Microsoft.Network/firewallPolicies/test-policy?api-version=2020-07-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '269'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'dae86a49-437d-11ec-a78c-ec5c68a2077a'
cli.azure.cli.core.sdk.policies: 'CommandName': 'network firewall policy update'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-n -g --threat-intel-mode --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.30.0 (MSI) azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.22000-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"id": "/subscriptions/<snip>/resourceGroups/Shared/providers/Microsoft.Network/firewallPolicies/test-policy", "location": "westeurope", "identity": {"type": "None"}, "properties": {"threatIntelMode": "Deny", "sku": {"tier": "Standard"}}} As you can see the only difference between using 'create' or 'update' is the request body Edit: Environment Summary
|
Describe the bug
ran:
az network firewall policy update --name --resource-group --threat-intel-mode Deny
on an existing Azure Firewall Policy in standard mode. This failes with the listed eror message. If running with --debug the command first appears to do a 'GET' to obtain all the properties for the policy, which does not contain the 'identity' property.
When doing the update the command includes "identity": {"type": "None"} in the payload, which it seems causes the listed error message.
Command Name
az network firewall policy update Extension Name: azure-firewall. Version: 0.12.0.
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az network firewall policy update --name {} --resource-group {} --threat-intel-mode {}
Expected Behavior
To be able to change settings for an existing Azure Firewall Policy in standard mode
Environment Summary
Additional Context
'GET' from --debug output:
'PUT' from --debug
The text was updated successfully, but these errors were encountered: