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
-
description
optional - string -
id
optional computed - string -
lab_name
required - string -
name
required - string -
resource_group_name
required - string -
tags
optional - map from string to string -
unique_identifier
optional computed - string -
subnet
list block-
name
optional computed - string -
use_in_virtual_machine_creation
optional - string -
use_public_ip_address
optional - string
-
-
timeouts
single 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
apiVersion
required - stringlocation
optional - stringThe location of the resource.
name
required - stringThe name of the virtual network.
properties
requiredallowedSubnets
optional arrayallowPublicIp
optional - stringThe permission policy of the subnet for allowing public IP addresses (i.e. Allow, Deny)).
labSubnetName
optional - stringThe name of the subnet as seen in the lab.
resourceId
optional - stringThe resource ID of the subnet.
description
optional - stringThe description of the virtual network.
externalProviderResourceId
optional - stringThe Microsoft.Network resource identifier of the virtual network.
subnetOverrides
optional arraylabSubnetName
optional - stringThe name given to the subnet within the lab.
resourceId
optional - stringThe resource ID of the subnet.
sharedPublicIpAddressConfiguration
optionalallowedPorts
optional arraybackendPort
optional - integerBackend port of the target virtual machine.
transportProtocol
optional - stringProtocol type of the port.
useInVmCreationPermission
optional - stringIndicates whether this subnet can be used during virtual machine creation (i.e. Allow, Deny).
usePublicIpAddressPermission
optional - stringIndicates whether public IP addresses can be assigned to virtual machines on this subnet (i.e. Allow, Deny).
virtualNetworkPoolName
optional - stringThe virtual network pool associated with this subnet.
tags
optional - stringThe tags of the resource.
type
required - 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.