Hi Team,
Please note that we are trying to create a VM in azure using terraform.
While doing so we have observed it is using older version of API -
GET /subscriptions/{subscriptionID}/providers?api-version=2016-02-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.17.5 (386-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v61.4.0 resources/2016-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/2.98.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.98.0"
}
random = {
source = "hashicorp/random"
version = "3.1.0"
}
null = {
source = "hashicorp/null"
version = "3.1.0"
}
}
required_version = “1.1.7”
}
{“token_type”:“Bearer”,“expires_in”:“3599”,“ext_expires_in”:“3599”,“expires_on”:“1646390498”,“not_before”:“1646386598”,“resource”:“https://management.azure.com/",“access_token”:"xxxxxx”}: timestamp=2022-03-04T15:11:38.325+0530
2022-03-04T15:11:38.325+0530 [DEBUG] provider.terraform-provider-azurerm_v2.98.0_x5.exe: AzureRM Request:
GET /subscriptions/xxxx/providers?api-version=2016-02-01 HTTP/1.1
Host: xxxxxx.azure.com
User-Agent: Go/go1.17.5 (386-windows) go-autorest/v14.2.1 Azure-SDK-For-Go/v61.4.0 resources/2016-02-01 HashiCorp Terraform/1.1.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/2.98.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
X-Ms-Correlation-Request-Id: da19aee3-c914-dcb2-89c9-b6b278d16ba8
Accept-Encoding: gzip: timestamp=2022-03-04T15:11:38.325+0530
2022-03-04T15:11:41.966+0530 [DEBUG] provider.terraform-provider-azurerm_v2.98.0_x5.exe: {"@level":“debug”,"@message":"AzureRM Response for https://management.azure.com/subscriptions/xxxxxxxx/providers?api-version=2016-02-01: \nHTTP/2.0 200 OK\r\nCache-Control: no-cache\r\nContent-Type: application/json; charset=utf-8\r\nDate: Fri, 04 Mar 2022 09:41:40 GMT\r\nExpires: -1\r\nPragma: no-cache\r\nStrict-Transport-Security: max-age=31536000
kindly let us know is there any way by which we can tune terraform it only take latest SDK API in this case latest one that should be used is api-version=2021-04-01