I am trying to deploy resources on azure. So I have created three files main.tf. variable.tf and provider.tf
Main.tf - example of a code from microsoft
`terraform {
required_providers {
azurerm = {
source = “hashicorp/azurerm”
version = “~>2.0”
}
}
}
creation of resource group
resource “azurerm_resource_group” “rg” {
name = “var.resource_group_name”
location = “var.resource_group_location”
}`
variable.tf
`variable “resource_group_name” {
default = “myResourceGroup”
}
variable “resource_group_location” {
default = “eastus”
}`
Provider.tf
`provider "azurerm" {
features {}
subscription_id = "cJ17Q~jxxxx"
tenant_id = "a1xxxx"
client_id = "f5ed6xxxx"
client_secret = "cJ17QxxxxxJ"
}`
When i input the command terraform plan i get the below error message
PS F:\terraform> terraform plan ╷ │ Error: "var.resource_group_location" was not found in the list of supported Azure Locations: "westus,westus2,eastus,centralus,centraluseuap,southcentralus,northcentralus,westcentralus,eastus2,eastus2euap,brazilsouth,brazilus,northeurope,westeurope,eastasia,southeastasia,japanwest,japaneast,koreacentral,koreasouth,southindia,westindia,centralindia,australiaeast,australiasoutheast,canadacentral,canadaeast,uksouth,ukwest,francecentral,francesouth,australiacentral,australiacentral2,uaecentral,uaenorth,southafricanorth,southafricawest,switzerlandnorth,switzerlandwest,germanynorth,germanywestcentral,norwayeast,norwaywest,brazilsoutheast,westus3,swedencentral,swedensouth" │ │ with azurerm_resource_group.rg, │ on main.tf line 14, in resource "azurerm_resource_group" "rg": │ 14: location = "var.resource_group_location"
Note: I am not an expert in Terraform i hope you could help me out in this regard