Adding an FQDN using the '--target-fqdns' in a network rule via command az network firewall policy rule-collection-group collection rule add returns an error: "Firewall Policy Network Rule testFQDN must have one of destinationAddresses, destinationIpGroups or destinationFqdns specified"
az network firewall policy rule-collection-group collection rule add -g $globalRg --collection-name $RuleColName --name "testFQDN" --policy-name $azfwPolicyName --rcg-name $rcgName --rule-type "NetworkRule" --source-ip-groups $sourceIpGroup --destination-ports $destports --ip-protocols $protocols --target-fqdns "www.microsoft.com"
Extended Error details:
Command group 'network firewall policy rule-collection-group collection rule' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus Operation failed with status: 'Bad Request'. Details: 400 Client Error: Bad Request for url: https://management.azure.com/subscriptions/subscriptionID/resourceGroups/resourcegroup/providers/Microsoft.Network/firewallPolicies/fwpolicyname/ruleCollectionGroups/rcgName?api-version=2020-07-01{ "Message": "The request is invalid.", "ModelState": { "resource": [ "{\"Status\":\"Failed\",\"Error\":{\"Code\":\"FirewallPolicyRuleDestinationAddressesOrIpgroupsOrFqdnsMustBeSpecified\",\"Message\":\"Firewall Policy Network Rule testFQDN must have one of destinationAddresses, destinationIpGroups or destinationFqdns specified.\",\"Target\":null}}" ] } }
I cannot find any other command to pass the destination fqdns to this network rule.