Azure Dev Test Virtual Network
This page shows how to write Terraform and Azure Resource Manager for Dev Test Virtual Network and write them securely.
azurerm_dev_test_virtual_network (Terraform)
The Virtual Network in Dev Test can be configured in Terraform with the resource name azurerm_dev_test_virtual_network. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_dev_test_virtual_network" "this" {
description = var.description
lab_name = var.lab_name
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
resource "azurerm_dev_test_virtual_network" "this" {
description = var.description
lab_name = var.lab_name
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
resource "azurerm_dev_test_virtual_network" "lab" {
name = var.lab_virtual_network_name
lab_name = azurerm_dev_test_lab.lab.name
resource_group_name = azurerm_resource_group.lab.name
subnet {
resource "azurerm_dev_test_virtual_network" "main" {
name = format("%s-network", var.dev_test_lab_settings.name)
resource_group_name = local.resource_group_name
lab_name = azurerm_dev_test_lab.main.name
description = var.dev_test_lab_settings.description
subnet {
Parameters
-
descriptionoptional - string -
idoptional computed - string -
lab_namerequired - string -
namerequired - string -
resource_group_namerequired - string -
tagsoptional - map from string to string -
unique_identifieroptional computed - string -
subnetlist block-
nameoptional computed - string -
use_in_virtual_machine_creationoptional - string -
use_public_ip_addressoptional - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages a Virtual Network within a DevTest Lab.
Microsoft.DevTestLab/labs/virtualnetworks (Azure Resource Manager)
The labs/virtualnetworks in Microsoft.DevTestLab can be configured in Azure Resource Manager with the resource name Microsoft.DevTestLab/labs/virtualnetworks. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"devTestLabsName": {
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"labs_coursapi_name": {
Parameters
apiVersionrequired - stringlocationoptional - stringThe location of the resource.
namerequired - stringThe name of the virtual network.
propertiesrequiredallowedSubnetsoptional arrayallowPublicIpoptional - stringThe permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
labSubnetNameoptional - stringThe name of the subnet as seen in the lab.
resourceIdoptional - stringThe resource ID of the subnet.
descriptionoptional - stringThe description of the virtual network.
externalProviderResourceIdoptional - stringThe Microsoft.Network resource identifier of the virtual network.
subnetOverridesoptional arraylabSubnetNameoptional - stringThe name given to the subnet within the lab.
resourceIdoptional - stringThe resource ID of the subnet.
sharedPublicIpAddressConfigurationoptionalallowedPortsoptional arraybackendPortoptional - integerBackend port of the target virtual machine.
transportProtocoloptional - stringProtocol type of the port.
useInVmCreationPermissionoptional - stringIndicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny).
usePublicIpAddressPermissionoptional - stringIndicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny).
virtualNetworkPoolNameoptional - stringThe virtual network pool associated with this subnet.
tagsoptional - stringThe tags of the resource.
typerequired - string
Frequently asked questions
What is Azure Dev Test Virtual Network?
Azure Dev Test Virtual Network is a resource for Dev Test of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Dev Test Virtual Network?
For Terraform, the kevinhead/azurerm, niveklabs/azurerm and faroukfriha/azure-as-code source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the 0x6797/azure-rm-templates and mikenelson-io/DevTestLabs source code examples are useful. See the Azure Resource Manager Example section for further details.