Azure / arm-template-whatif

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

Noise with AppInsights properties #326

Open Philippe85 opened 1 year ago

Philippe85 commented 1 year ago

Describe the noise

The azure resource is upt-to-date. But I get always the same What-If report.

Resource type (i.e. Microsoft.Storage/storageAccounts) microsoft.insights/components

apiVersion (i.e. 2019-04-01) The last : 2020-02-02

Client (PowerShell, Azure CLI, or API) PowerShell

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

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "location": {
            "type": "string",
            "metadata": { "description": "Resources location" },
            "defaultValue": "francecentral"
        },
        "tags": {
            "type": "object",
            "metadata": { "description": "List of tags to apply to ressources" }
        },
        "appInsightsName": {
            "type": "string",
            "metadata": { "description": "Name of the App Insights" },
            "maxLength" : 60
        }
    },
    "resources": [
        {
            "type": "microsoft.insights/components",
            "apiVersion": "2020-02-02",
            "name": "[parameters('appInsightsName')]",
            "location": "[parameters('location')]",
            "tags": "[parameters('tags')]",
            "kind": "web",
            "properties": {
                "Application_Type": "web",
                "SamplingPercentage": 100,
                "RetentionInDays": 90,
                "IngestionMode": "ApplicationInsights",
                "publicNetworkAccessForIngestion": "Enabled",
                "publicNetworkAccessForQuery": "Enabled"
            }
        }
    ]
}

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

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text) I get indefinitly this What-If report :

  ~ microsoft.insights/components/MyAppInsights [2020-02-02]
    + properties.Flow_Type:      "Bluefield"
    + properties.Request_Source: "rest"
tstooke commented 1 year ago

This also happens when those two properties are included in the template, such as in this Bicep snippet:

resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
  name: 'myAppInsights'
  location: resourceGroup().location
  kind: 'web'
  properties: {
    Application_Type: 'web'
    WorkspaceResourceId: logAnalyticsId
    Flow_Type: 'Bluefield'
    Request_Source: 'rest'
  }
}
Philippe85 commented 11 months ago

Can you deal with this noise?

satano commented 9 months ago

Just a note, this is a duplicate of #305.