Azure / arm-template-whatif

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

Microsoft.Insights #89

Open JamesDLD opened 4 years ago

JamesDLD commented 4 years ago

Describe the noise

Resource type Microsoft.Insights

apiVersion 2018-05-01-preview

Client 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 Complete template sample is available here

        {
            "type": "Microsoft.Insights/components",
            "apiVersion": "2018-05-01-preview",
            "location": "[parameters('location')]",
            "name": "[variables('applicationInsightsName')]",
            "tags": "[union(variables('additional_tags'),resourceGroup().tags)]",
            "kind": "web",
            "properties": {
                "Application_Type": "web",
                "ApplicationId": "[variables('applicationInsightsName')]"
            }
        }

Expected response I expected no noise since the template has not been modified since the resources were deployed

Current (noisy) response

  ~ Microsoft.Insights/components/whp-corp-dev-poly-fnapp1 [2018-05-01-preview]
    + properties.Flow_Type:      "Bluefield"
    + properties.Request_Source: "rest"

Additional context Thank you for this feature, I was a fan of Terraform so I really appreciate the work done here.

alex-frankel commented 4 years ago

Can you double check that the template is correct? Both properties.Flow_Type and properties.Request_Source are not in the template that you linked to

JamesDLD commented 4 years ago

Yes I confirm those are not in the template but the output appear like this. I tried to add them in the template, after one apply with success it is still asked when using « what if ».

alex-frankel commented 4 years ago

Do you have any modify or append policies configured in this subscription that may be augmenting the resource properties?

JamesDLD commented 4 years ago

I don’t think so, to be sure I will deploy de full arm template in another subscription /tenant, I don’t have access to my laptop, will do that on Monday.

JamesDLD commented 4 years ago

Yes I confirm, you can view it by launching the following commands.

# First creation
New-AzResourceGroupDeployment -Name "whatif89" -ResourceGroupName $RgName `
  -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-function-premium-vnet-integration/azuredeploy.json `
  -appName "whatif89" `
  -vnetName "debugvnet1" `
  -subnetName "debugsnet1" `
  -ErrorAction Stop

# What If
New-AzResourceGroupDeployment -Name "whatif89" -ResourceGroupName $RgName `
  -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-function-premium-vnet-integration/azuredeploy.json `
  -appName "whatif89" `
  -vnetName "debugvnet1" `
  -subnetName "debugsnet1" `
  -WhatIf  -ErrorAction Stop
image
alex-frankel commented 4 years ago

Gotcha - I am seeing the same noise when I repro as well. Thank you for double-checking. We will investigate further.

shenglol commented 4 years ago

@alex-frankel Those are default values coming from the RP's Swagger (which wins over our custom metadata), but they are in fact immutable properties. We need to ask the RP team to fix their Swagger.

floriankoch commented 3 years ago

The Noise is still present

 ~ microsoft.insights/components/xxxxxx [2020-02-02-preview]
    + properties.Flow_Type: "Bluefield"
mikeblakeuk commented 2 years ago

~ Microsoft.Insights/components/xxxxxx [2020-02-02]