Azure / arm-template-whatif

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

Noise in multiple properties of `Microsoft.DocumentDB/databaseAccounts` #374

Open xaxledev opened 2 months ago

xaxledev commented 2 months ago

Describe the noise

Resource type Microsoft.DocumentDB/databaseAccounts

apiVersion (i.e. 2019-04-01) 2022-05-15

Client (PowerShell, Azure CLI, or API) Azure CLI

Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template

{
            "type": "Microsoft.DocumentDB/databaseAccounts",
            "apiVersion": "2022-05-15",
            "name": "[parameters('regionalCosmosDBName')]",
            "location": "israelcentral",
            "tags": {
                "defaultExperience": "Core (SQL)"
            },
            "kind": "GlobalDocumentDB",
            "properties": {
                "publicNetworkAccess": "Enabled",
                "enableAutomaticFailover": true,
                "enableMultipleWriteLocations": false,
                "isVirtualNetworkFilterEnabled": false,
                "virtualNetworkRules": [],
                "disableKeyBasedMetadataWriteAccess": false,
                "enableFreeTier": false,
                "enableAnalyticalStorage": false,
                "databaseAccountOfferType": "Standard",
                "consistencyPolicy": {
                    "defaultConsistencyLevel": "Session",
                    "maxIntervalInSeconds": 5,
                    "maxStalenessPrefix": 100
                },
                "locations": [
                    {
                        "locationName": "Israel Central",
                        "failoverPriority": 0,
                        "isZoneRedundant": true
                    }
                ],
                "capabilities": [],
                "ipRules": [],
                "backupPolicy": {
                    "type": "Continuous",
                    "continuousModeProperties": {
                        "tier": "Continuous30Days"
                    }
                }
            }
        }

Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed) Expected no noise since the template has not been modified since the resources were deployed

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text) image

WillParry commented 2 months ago

Similar issues with, apiVersion: 2015-04-08.

- properties.sqlEndpoint

I'm not clear if the following is white noise or is a valid concern, as the template hasn't been deployed for a while:

- properties.ipRangeFilter

Will not defining the ipRangeFilter in the ARM template remove the ipRangeFilter created through a PowerShell Script?

dj-r1 commented 2 months ago

Having similar noise as following (with API 2024-02-15-preview):

{
  "configurationOverrides": {
    "EnableBsonSchema": "True",
    "EnablePerRegionPerPartitionAutoscaleOptIn": "True"
  },
  "defaultPriorityLevel": "High",
  "enablePerRegionPerPartitionAutoscale": false,
  "enablePriorityBasedExecution": false,
  "minMaxThresholdsForPriorityBasedExecution": {
    "maxPercentForHighPriorityRequests": 100,
    "maxPercentForLowPriorityRequests": 100,
    "minPercentForHighPriorityRequests": 0,
    "minPercentForLowPriorityRequests": 0
  },
  "sqlEndpoint": "https://my-cosmos-domain.documents.azure.com:000/"
}

Such property values are not listed in e.g. Bicep Microsoft.DocumentDB/databaseAccounts. Having in code defaultPriorityLevel may work with re-deployments, but for new provisioning is causing errors.