Hello All,
Hoping someone can help please,
Trying to create a Virtual Network Gateway to connect to an ExpressRoute Circuit using the below module,
resource “azurerm_virtual_network_gateway” “ergw” {
name = “ergw”
location = “{azurerm_resource_group.ens_hub_rg.location}"
resource_group_name = "{azurerm_resource_group.ens_hub_rg.name}”
type = “ExpressRoute”
sku = “HighPerformance”
ip_configuration {
name = “ERGatewayConfig”
public_ip_address_id = “{azurerm_public_ip.ergw_public_ip.id}"
private_ip_address_allocation = "Dynamic"
subnet_id = "{azurerm_subnet.gatewaysubnet.id}”
}
}
getting an error,
a managed resource “Azurerm_public_Ip” “example” has not been declared in the root module.