azurerm_dev_test_virtual_network

Manages a Virtual Network within a DevTest Lab.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_dev_test_lab" "example" {
  name                = "example-devtestlab"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  tags = {
    "Sydney" = "Australia"
  }
}

resource "azurerm_dev_test_virtual_network" "example" {
  name                = "example-network"
  lab_name            = azurerm_dev_test_lab.example.name
  resource_group_name = azurerm_resource_group.example.name

  subnet {
    use_public_ip_address           = "Allow"
    use_in_virtual_machine_creation = "Allow"
  }
}

Argument Reference

The following arguments are supported:


A subnet block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:


A subnet block exports the following:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

DevTest Virtual Networks can be imported using the resource id, e.g.

terraform import azurerm_dev_test_virtual_network.network1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualNetworks/network1