I tried to create one vnet and one subnet but it is failing with error. Below is the code and followed by error.
code:
terraform {
required_providers {
azurerm = {
source = “hashicorp/azurerm”
version = “=2.99.0”
}
}
}
Adding provider azure
provider “azurerm” {
features {}
subscription_id = “xxx”
tenant_id = “zz”
client_id = “pp”
client_secret = “qq”
}
resource “azurerm_resource_group” “rg” {
name = “app-grp”
location = “eastus”
tags = {
Envirounment = "Staging"
}
}
resource “azurerm_virtual_network” “vnet” {
name = “guruVnet”
address_space = [“10.0.0.0/16”]
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
subnet {
name = “gurusubnet”
address_prefix = “10.0.1.0/24”
}
tags = {
Envirounment = "Staging"
}
}
error:
Please suggest what could be wrong here. Thank you.