Skip to content

Data Source: azurermDevTestVirtualNetwork

Use this data source to access information about an existing Dev Test Lab Virtual Network.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermDevTestVirtualNetworkExample =
  new azurerm.dataAzurermDevTestVirtualNetwork.DataAzurermDevTestVirtualNetwork(
    this,
    "example",
    {
      lab_name: "examplelab",
      name: "example-network",
      resource_group_name: "example-resource",
    }
  );
new cdktf.TerraformOutput(this, "lab_subnet_name", {
  value: `\${${dataAzurermDevTestVirtualNetworkExample.allowedSubnets.fqn}[0].lab_subnet_name}`,
});

Argument Reference

  • name - Specifies the name of the Virtual Network.
  • labName - Specifies the name of the Dev Test Lab.
  • resourceGroupName - Specifies the name of the resource group that contains the Virtual Network.

Attributes Reference

  • allowedSubnets - The list of subnets enabled for the virtual network as defined below.
  • subnetOverrides - The list of permission overrides for the subnets as defined below.
  • uniqueIdentifier - The unique immutable identifier of the virtual network.

An allowedSubnets block supports the following:

  • allowPublicIp - Indicates if this subnet allows public IP addresses. Possible values are allow, default and deny.

  • labSubnetName - The name of the subnet.

  • resourceId - The resource identifier for the subnet.


An subnetsOverride block supports the following:

  • labSubnetName - The name of the subnet.

  • resourceId - The resource identifier for the subnet.

  • useInVmCreationPermission - Indicates if the subnet can be used for VM creation. Possible values are allow, default and deny.

  • usePublicIpPermission - Indicates if the subnet can be assigned public IP addresses. Possible values are allow, default and deny.

  • virtualNetworkPoolName - The virtual network pool associated with this subnet.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Dev Test Lab Virtual Network.