Azure/arm-ttk

Microsoft.OperationalInsights/workspaces uses a preview version ( 2021-12-01-preview ) and there are more recent versions available.

kaigalmane opened this issue · 13 comments

While executing the unit test with Log Analytics Workspace ARM template, an error was thrown as below. As per Microsoft documentation we could see that the latest version is the one we used as of now.

image

@kaigalmane - can you attach the template or a resource snippet

Documentation and bicep:

  • 2020-03-01-peview
  • 2020-08-01
  • 2020-10-01
  • 2021-12-01-preview

arm-ttk:

  • 2021-12-01-preview
  • 2022-10-01
  • 2022-10-01

arm-deploy:

  • 2017-04-26-preview
  • 2020-03-01-preview
  • 2020-08-01
  • 2021-12-01-preview
  • 2022-10-01

check the bicep issue for screenshots

@kaigalmane - can you attach the template or a resource snippet

resource loganalytics_workspace_resource 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
  name: loganalyticsName
  location: location
  tags: tags
  properties: {
    retentionInDays: 30
    sku: {
      name: 'PerGB2018'
    }
  }
}

Got it - thanks... It looks like the TTK is reporting accurately in this case. The TTK pulls apiVersions from the service, specifically the /providers api... You can query a specific resourceType by:

(Get-AzResourceProvider -ProviderNamespace Microsoft.OperationalInsights | select -expand resourceTypes | where-object{$_.resourceTypeName -eq "workspaces/tables"}).apiVersions

Though it is a bit strange that the latest is in the future. Does it work if you use that version?

FWIW, both docs and bicep use published specs/types... given this version is in the future I could see those not being live yet.

we had a lot of tries with it. it will take some time to look it up, but I think that future had a concurrency issue.

so workspace and tables have a different version if you split it up?

this looks fine in the VSCode:
2022-08-29_22-03
(but it is failing)
but if I choose the latest stable:
2022-08-29_22-05

Oh sorry - I meant whether you're allowed to use the 2022-10-01 apiVersion against the service. IOW, if you use 2022-10-01, does the deployment succeed?

re: the bicep error saying you have to use the existing keyword - I have not seen that before can you add that to the bicep issue?

It does not work for Microsoft.OperationalInsights/workspaces/tables@2022-10-01
We get:

  "error": {
    "code": "BadRequest",
    "message": "Unsupported api version - 2022-10-01"
  }

@anagyzambo-kx - thanks... that's a different error message than what is normally shown when an apiVersion isn't available (that error message will tell you what is available). I think what we're seeing, given the apiVersion is in the future and not working, is that it's only available to customers that enable the feature (whether that's private or public IDK).

A few options I can think of:

  1. special case this apiVersion in the TTK (can of worms)
  2. ignore the TTK error for now as it should resolve when the apiVersion goes public
  3. contact support to let them know the apiVersion is "live" but not working - this will probably take a ton of explaining to the support rep and the Insights team will probably ignore if it's transient.

I'd like to go with #2 for the time being but open to other suggestions...