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 WhatIf `microsoft.insights/privateLinkScopes` : scopeId #364

Open dj-r1 opened 6 months ago

dj-r1 commented 6 months ago

Describe the noise

Resource type microsoft.insights/privateLinkScopes

apiVersion 2021-07-01-preview

Client (PowerShell, Azure CLI, or API) PowerShell

Relevant Bicep code

resource privateLinkScope 'microsoft.insights/privatelinkscopes@2021-07-01-preview' = {
  name: privateLinkScopeName
  location: 'global'
  properties: {
    accessModeSettings: {
      queryAccessMode: 'Open'
      ingestionAccessMode: 'PrivateOnly'
    }
  }
}

Expected response

{
  "apiVersion": "2021-07-01-preview",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUPNAME/providers/microsoft.insights/privateLinkScopes/RESOURCENAME1-ampls",
  "location": "global",
  "name": "RESOURCENAME1-ampls",
  "properties": {
    "accessModeSettings": {
      "ingestionAccessMode": "PrivateOnly",
      "queryAccessMode": "Open"
    },
  },
  "type": "microsoft.insights/privateLinkScopes"
}

Current (noisy) response

{
  "apiVersion": "2021-07-01-preview",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUPNAME/providers/microsoft.insights/privateLinkScopes/RESOURCENAME1-ampls",
  "location": "global",
  "name": "RESOURCENAME1-ampls",
  "properties": {
    "accessModeSettings": {
      "ingestionAccessMode": "PrivateOnly",
      "queryAccessMode": "Open"
    },
    "scopeId": "000aa000-0000-0a00-00a0-aa0000a000a0"
  },
  "type": "microsoft.insights/privateLinkScopes"
}

Additional context WhatIf should not output parameters like scopeId with guid. Noisy parameters: properties.scopeId

It's interesting that documentation for Private Link Scopes follows lowercase resource API name microsoft.insights/privatelinkscopes, contrary to other resources.