Incompatible provider version

Pretty new to Terraform and keep getting the above error, I’ve searched the forums, but haven’t found a resolution to my error :frowning: file is as follows:
provider “azurerm” {
features {}


#Resource Groups
resource “azure_resource_group” “web_server_rg” {
name = “web-rg”
location = “westus2”

Error i receive when running: Terraform init is as follows:
Initializing the backend…

Initializing provider plugins…

  • Reusing previous version of hashicorp/azurerm from the dependency lock file
  • Finding latest version of terraform-providers/azure…
  • Installing hashicorp/azurerm v2.42.0…
  • Installed hashicorp/azurerm v2.42.0 (signed by HashiCorp)

Warning: Additional provider information from registry

The remote registry returned warnings for

  • This provider is for Azure Classic (also known as Service Management). You
    are probably looking for the Azure Resource Manager provider

Error: Incompatible provider version

No compatible versions of provider were found.

Any help would be appreciated.

managed to resolve the issue:-) forgot to add “rm” to resource, should be:
resource “azurerm_resource_group” “web_server_rg” {
name = “web-rg”
location = “westus2”

1 Like