1
votes

In azure, I need to get Vnet details for a tenant and find all subnet details.

In terraform website we can iterate only one vnet with name and resource group.

1
What details do you want exactly? And what are you trying to achieve here?ydaetskcoR

1 Answers

0
votes

Did this help you? Use data sources to get exist resources details.

data "azurerm_subnet" "test" {
  name                 = "backend"
  virtual_network_name = "production"
  resource_group_name  = "networking"
}

output "subnet_id" {
  value = "${data.azurerm_subnet.test.id}"
}

Reference: https://www.terraform.io/docs/providers/azurerm/d/subnet.html