Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Insights/webtests #3232

Open
DavidDeSloovere opened this issue Jun 15, 2021 · 0 comments
Open

Microsoft.Insights/webtests #3232

DavidDeSloovere opened this issue Jun 15, 2021 · 0 comments

Comments

@DavidDeSloovere
Copy link

Bicep version
0.4.63 (7ebed03)

Describe the bug
Latest version of Microsoft.Insights/webtests@2020-10-05-preview, that is available via intellisense in VS code, can not be deployed. Older version Microsoft.Insights/webtests@2015-05-01 can be deployed without problem.

https://docs.microsoft.com/en-us/azure/templates/microsoft.insights/2020-10-05-preview/webtests?tabs=json

Info from the failed deployment in the Azure Portal.

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'westeurope' and API version '2020-10-05-preview' for type 'webtests'. The supported api-versions are '2014-04-01, 2014-08-01, 2014-12-01-preview, 2015-05-01, 2018-05-01-preview'. The supported locations are ', eastus, southcentralus, northeurope, westeurope, southeastasia, westus2, uksouth, centralindia, canadacentral, japaneast, australiaeast, koreacentral, francecentral, centralus, eastus2, eastasia, westus, southafricanorth, northcentralus, brazilsouth, switzerlandnorth, norwayeast, norwaywest, australiasoutheast, australiacentral2, germanywestcentral, switzerlandwest, uaecentral, ukwest, brazilsoutheast, japanwest, uaenorth, australiacentral, francesouth, southindia'."}]}

The intellisense only show 2015-05-01 and 2020-10-05-preview. But the message supports many more versions.

To Reproduce

param location string = resourceGroup().location
//param appInsightsResourceId string
param appInsights_webTestUrl string

resource pingTest 'Microsoft.Insights/webtests@2020-10-05-preview' = {
  name: 'ping root test'
  location: location
  kind: 'ping'
  tags: {
    createdwith: 'natch-bicep'
    //'hidden-link:${appInsightsResourceId}': 'Resource'
  }
  properties: {
    Name: 'ping root test'
    SyntheticMonitorId: 'ping root test'
    Description: 'Ping test to root with certificate check.'
    Kind: 'ping'
    Enabled: false
    Frequency: 300
    Timeout: 30
    RetryEnabled: true
    Locations: [
      {
        Id: 'emea-nl-ams-azr'
      }
      {
        Id: 'emea-se-sto-edge'
      }
      {
        Id: 'emea-ru-msa-edge'
      }
      {
        Id: 'emea-gb-db3-azr'
      }
      {
        Id: 'emea-ch-zrh-edge'
      }
      {
        Id: 'emea-fr-pra-edge'
      }
    ]
    Configuration: {
      WebTest: '<WebTest xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Name="PING root" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="30" WorkItemIds="" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale=""><Items><Request Encoding="utf-8" Method="GET" Version="1.1" Url="${appInsights_webTestUrl}" ThinkTime="0" Timeout="30" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" ExpectedHttpStatusCode="200" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" /></Items></WebTest>'
    }
    // 📢 Validation rules not available in version 2015-05-01
    // ValidationRules: {
    //   ExpectedHttpStatusCode: 200
    //   SSLCertRemainingLifetimeCheck: 7
    //   SSLCheck: true
    // }
  }
}

az deployment group create --template-file ./main.bicep --resource-group myrg

Additional context
I don't know if this is by design. Maybe I can't use a preview version on the public version of Azure. But it's confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants