microsoft/azure-pipelines-extensions

TerraformTaskV1@0 Invalid Api Version for Connecting to Azure Stack Hub

mariuszfrompoland opened this issue · 0 comments

Issue happens when selecting resource group in task TerraformTaskV1@0.
After selecting correct Azure Subscription and clicking on resource group list it displays error:

Failed to query service connection API: 'https://management.XXXXXXXXX/subscriptions/XXXXX/resourcegroups?api-version=2019-05-01'. Status Code: 'BadRequest', Response from server: '{"error":{"code":"InvalidApiVersionParameter","message":"The api-version '2019-05-01' is invalid. The supported versions are '2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."}}'

Azure Stack Hub is available in limited Provider Api Version. The newest is 2018-09-01.

In

"endpointUrl": "{{{endpoint.url}}}subscriptions/{{{endpoint.subscriptionId}}}/resourcegroups?api-version=2019-05-01",

the api to use for querying Azure is static and set to 2019-05-01.

Will the api version be setable in the future or is there previous version of this task with older api version that can be used?