Azure / arm-template-whatif

A repository to track issues related to what-if noise suppression
MIT License
90 stars 14 forks source link

Noise in `Microsoft.Network firewallPolicies/ruleCollectionGroups` : size, ipv6Rule #368

Open dj-r1 opened 4 months ago

dj-r1 commented 4 months ago

Describe the noise

Resource type Microsoft.Network firewallPolicies/ruleCollectionGroups

apiVersion 2023-09-01, 2023-11-01

Client (PowerShell, Azure CLI, or API) PowerShell

Expected response

{
  "apiVersion": "2023-09-01",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.Network/firewallPolicies/RESOURCENAME-policy/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup",
  "location": "global",
  "name": "DefaultNetworkRuleCollectionGroup",
  "properties": {
    "priority": 100,
    "ruleCollections": [
      {
        "action": {
          "type": "Allow"
        },
        "name": "networkRuleCollection1",
        "priority": 1000,
        "ruleCollectionType": "FirewallPolicyFilterRuleCollection",
        "rules": [
          {
            "destinationAddresses": [
              "*"
            ],
            "destinationPorts": [
              "123"
            ],
            "ipProtocols": [
              "Any"
            ],
            "name": "networkRule1",
            "ruleType": "NetworkRule",
            "sourceAddresses": [
              "*"
            ]
          }
        ]
      }
    ],
  },
  "type": "Microsoft.Network/firewallPolicies/ruleCollectionGroups"
}

Current (noisy) response

{
  "apiVersion": "2023-09-01",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.Network/firewallPolicies/RESOURCENAME-policy/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup",
  "location": "global",
  "name": "DefaultNetworkRuleCollectionGroup",
  "properties": {
    "priority": 100,
    "ruleCollections": [
      {
        "action": {
          "type": "Allow"
        },
        "name": "networkRuleCollection1",
        "priority": 1000,
        "ruleCollectionType": "FirewallPolicyFilterRuleCollection",
        "rules": [
          {
            "destinationAddresses": [
              "*"
            ],
            "destinationPorts": [
              "123"
            ],
            "ipProtocols": [
              "Any"
            ],
            "ipv6Rule": false,
            "name": "networkRule1",
            "ruleType": "NetworkRule",
            "sourceAddresses": [
              "*"
            ]
          }
        ]
      }
    ],
    "size": "0.001937866 MB"
  },
  "type": "Microsoft.Network/firewallPolicies/ruleCollectionGroups"
}

Additional context

WhatIf should not output parameters like size, ipv6Rule Noisy parameters: