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.OperationsManagement/solutions` : creationTime #366

Open dj-r1 opened 4 months ago

dj-r1 commented 4 months ago

Describe the noise

Resource type

apiVersion 2015-11-01-preview

Client (PowerShell, Azure CLI, or API) PowerShell

Relevant Bicep code

resource logAnalyticsSolutions 'Microsoft.OperationsManagement/solutions@2015-11-01-preview' = {
  name: NAME1
  location: 'polandcentral'
  plan: {
    name: 'PLAN_NAME'
    product: 'OMSGallery/GALLERY_NAME1'
    promotionCode: ''
    publisher: 'Microsoft'
  }
  properties: {
    workspaceResourceId: LOG_ANALYTICS_WORKSPACE.id
  }
}

Expected response

{
  "apiVersion": "2015-11-01-preview",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(RESOURCE_NAME1)",
  "location": "polandcentral",
  "name": "GALLERY_NAME1(RESOURCE_NAME1)",
  "plan": {
    "name": "GALLERY_NAME1(RESOURCE_NAME1)",
    "product": "OMSGallery/GALLERY_NAME1",
    "publisher": "Microsoft"
  },
  "properties": {
    "workspaceResourceId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.OperationalInsights/workspaces/RESOURCE_NAME1"
  },
  "type": "Microsoft.OperationsManagement/solutions"
}

Current (noisy) response

{
  "apiVersion": "2015-11-01-preview",
  "id": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(RESOURCE_NAME1)",
  "location": "polandcentral",
  "name": "GALLERY_NAME1(RESOURCE_NAME1)",
  "plan": {
    "name": "GALLERY_NAME1(RESOURCE_NAME1)",
    "product": "OMSGallery/GALLERY_NAME1",
    "publisher": "Microsoft"
  },
  "properties": {
    "creationTime": "Fri, 14 Jul 2023 10:47:14 GMT",
    "workspaceResourceId": "/subscriptions/0000bb0-000b-0bb0-0000-bb00b0b0b00/resourceGroups/MY_RESOURCE_GROUP_NAME/providers/Microsoft.OperationalInsights/workspaces/RESOURCE_NAME1"
  },
  "type": "Microsoft.OperationsManagement/solutions"
}

Additional context

WhatIf should not output parameter like creationTime Noisy parameter: