GetVirtualNetwork

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.DevTest.GetVirtualNetwork.InvokeAsync(new Azure.DevTest.GetVirtualNetworkArgs
        {
            Name = "example-network",
            LabName = "examplelab",
            ResourceGroupName = "example-resource",
        }));
        this.LabSubnetName = example.Apply(example => example.AllowedSubnets[0].LabSubnetName);
    }

    [Output("labSubnetName")]
    public Output<string> LabSubnetName { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/devtest"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := devtest.LookupVirtualNetwork(ctx, &devtest.LookupVirtualNetworkArgs{
            Name:              "example-network",
            LabName:           "examplelab",
            ResourceGroupName: "example-resource",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("labSubnetName", example.AllowedSubnets[0].LabSubnetName)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.devtest.get_virtual_network(name="example-network",
    lab_name="examplelab",
    resource_group_name="example-resource")
pulumi.export("labSubnetName", example.allowed_subnets[0]["lab_subnet_name"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.devtest.getVirtualNetwork({
    name: "example-network",
    labName: "examplelab",
    resourceGroupName: "example-resource",
});
export const labSubnetName = example.then(example => example.allowedSubnets[0].labSubnetName);

Using GetVirtualNetwork

function getVirtualNetwork(args: GetVirtualNetworkArgs, opts?: InvokeOptions): Promise<GetVirtualNetworkResult>
function  get_virtual_network(lab_name=None, name=None, resource_group_name=None, opts=None)
func LookupVirtualNetwork(ctx *Context, args *LookupVirtualNetworkArgs, opts ...InvokeOption) (*LookupVirtualNetworkResult, error)

Note: This function is named LookupVirtualNetwork in the Go SDK.

public static class GetVirtualNetwork {
    public static Task<GetVirtualNetworkResult> InvokeAsync(GetVirtualNetworkArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

LabName string

Specifies the name of the Dev Test Lab.

Name string

Specifies the name of the Virtual Network.

ResourceGroupName string

Specifies the name of the resource group that contains the Virtual Network.

LabName string

Specifies the name of the Dev Test Lab.

Name string

Specifies the name of the Virtual Network.

ResourceGroupName string

Specifies the name of the resource group that contains the Virtual Network.

labName string

Specifies the name of the Dev Test Lab.

name string

Specifies the name of the Virtual Network.

resourceGroupName string

Specifies the name of the resource group that contains the Virtual Network.

lab_name str

Specifies the name of the Dev Test Lab.

name str

Specifies the name of the Virtual Network.

resource_group_name str

Specifies the name of the resource group that contains the Virtual Network.

GetVirtualNetwork Result

The following output properties are available:

AllowedSubnets List<GetVirtualNetworkAllowedSubnet>

The list of subnets enabled for the virtual network as defined below.

Id string

The provider-assigned unique ID for this managed resource.

LabName string
Name string
ResourceGroupName string
SubnetOverrides List<GetVirtualNetworkSubnetOverride>

The list of permission overrides for the subnets as defined below.

UniqueIdentifier string

The unique immutable identifier of the virtual network.

AllowedSubnets []GetVirtualNetworkAllowedSubnet

The list of subnets enabled for the virtual network as defined below.

Id string

The provider-assigned unique ID for this managed resource.

LabName string
Name string
ResourceGroupName string
SubnetOverrides []GetVirtualNetworkSubnetOverride

The list of permission overrides for the subnets as defined below.

UniqueIdentifier string

The unique immutable identifier of the virtual network.

allowedSubnets GetVirtualNetworkAllowedSubnet[]

The list of subnets enabled for the virtual network as defined below.

id string

The provider-assigned unique ID for this managed resource.

labName string
name string
resourceGroupName string
subnetOverrides GetVirtualNetworkSubnetOverride[]

The list of permission overrides for the subnets as defined below.

uniqueIdentifier string

The unique immutable identifier of the virtual network.

allowed_subnets List[GetVirtualNetworkAllowedSubnet]

The list of subnets enabled for the virtual network as defined below.

id str

The provider-assigned unique ID for this managed resource.

lab_name str
name str
resource_group_name str
subnet_overrides List[GetVirtualNetworkSubnetOverride]

The list of permission overrides for the subnets as defined below.

unique_identifier str

The unique immutable identifier of the virtual network.

Supporting Types

GetVirtualNetworkAllowedSubnet

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AllowPublicIp string

Indicates if this subnet allows public IP addresses. Possible values are Allow, Default and Deny.

LabSubnetName string

The name of the subnet.

ResourceId string

The resource identifier for the subnet.

AllowPublicIp string

Indicates if this subnet allows public IP addresses. Possible values are Allow, Default and Deny.

LabSubnetName string

The name of the subnet.

ResourceId string

The resource identifier for the subnet.

allowPublicIp string

Indicates if this subnet allows public IP addresses. Possible values are Allow, Default and Deny.

labSubnetName string

The name of the subnet.

resourceId string

The resource identifier for the subnet.

allowPublicIp str

Indicates if this subnet allows public IP addresses. Possible values are Allow, Default and Deny.

lab_subnet_name str

The name of the subnet.

resource_id str

The resource identifier for the subnet.

GetVirtualNetworkSubnetOverride

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

LabSubnetName string

The name of the subnet.

ResourceId string

The resource identifier for the subnet.

UseInVmCreationPermission string

Indicates if the subnet can be used for VM creation. Possible values are Allow, Default and Deny.

UsePublicIpAddressPermission string
VirtualNetworkPoolName string

The virtual network pool associated with this subnet.

LabSubnetName string

The name of the subnet.

ResourceId string

The resource identifier for the subnet.

UseInVmCreationPermission string

Indicates if the subnet can be used for VM creation. Possible values are Allow, Default and Deny.

UsePublicIpAddressPermission string
VirtualNetworkPoolName string

The virtual network pool associated with this subnet.

labSubnetName string

The name of the subnet.

resourceId string

The resource identifier for the subnet.

useInVmCreationPermission string

Indicates if the subnet can be used for VM creation. Possible values are Allow, Default and Deny.

usePublicIpAddressPermission string
virtualNetworkPoolName string

The virtual network pool associated with this subnet.

lab_subnet_name str

The name of the subnet.

resource_id str

The resource identifier for the subnet.

useInVmCreationPermission str

Indicates if the subnet can be used for VM creation. Possible values are Allow, Default and Deny.

usePublicIpAddressPermission str
virtualNetworkPoolName str

The virtual network pool associated with this subnet.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.