Having issue with Deploy HCP Consul with AKS using Terraform

Tried to use the

terraform quick start to deploy consul in AKS

but noticed below in the code.

terraform {
** required_providers {**
** azurerm = {**
** source = “hashicorp/azurerm”**
** version = “~> 2.65”**
** configuration_aliases = [azurerm.azure]**
** }**

But the moment we run init below happens.

PS E:\consul\terraform-consul\azure-learning> terraform.exe init
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Invalid required_providers object

** on main.tf line 15, in terraform:**
** 15: azurerm = {**
** 16: source = “hashicorp/azurerm”**
** 17: version = “~> 2.65”**
** 18: configuration_aliases = [azurerm.azure]**
** 19: }**

required_providers objects can only contain “version” and “source” attributes.
To configure a provider, use a “provider” block.

Error: Variables not allowed

** on main.tf line 18, in terraform:**
** 18: configuration_aliases = [azurerm.azure]**

The code you have shown is correct.

Are you perhaps using an old obsolete version of Terraform?