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
LookupVirtualNetworkin the Go SDK.
public static class GetVirtualNetwork {
public static Task<GetVirtualNetworkResult> InvokeAsync(GetVirtualNetworkArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetVirtualNetwork Result
The following output properties are available:
- Allowed
Subnets List<GetVirtual Network Allowed Subnet> The list of subnets enabled for the virtual network as defined below.
- Id string
The provider-assigned unique ID for this managed resource.
- Lab
Name string - Name string
- Resource
Group stringName - Subnet
Overrides List<GetVirtual Network Subnet Override> The list of permission overrides for the subnets as defined below.
- Unique
Identifier string The unique immutable identifier of the virtual network.
- Allowed
Subnets []GetVirtual Network Allowed Subnet The list of subnets enabled for the virtual network as defined below.
- Id string
The provider-assigned unique ID for this managed resource.
- Lab
Name string - Name string
- Resource
Group stringName - Subnet
Overrides []GetVirtual Network Subnet Override The list of permission overrides for the subnets as defined below.
- Unique
Identifier string The unique immutable identifier of the virtual network.
- allowed
Subnets GetVirtual Network Allowed Subnet[] The list of subnets enabled for the virtual network as defined below.
- id string
The provider-assigned unique ID for this managed resource.
- lab
Name string - name string
- resource
Group stringName - subnet
Overrides GetVirtual Network Subnet Override[] The list of permission overrides for the subnets as defined below.
- unique
Identifier string The unique immutable identifier of the virtual network.
- allowed_
subnets List[GetVirtual Network Allowed Subnet] 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_ strname - subnet_
overrides List[GetVirtual Network Subnet Override] 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.
- Allow
Public stringIp Indicates if this subnet allows public IP addresses. Possible values are
Allow,DefaultandDeny.- Lab
Subnet stringName The name of the subnet.
- Resource
Id string The resource identifier for the subnet.
- Allow
Public stringIp Indicates if this subnet allows public IP addresses. Possible values are
Allow,DefaultandDeny.- Lab
Subnet stringName The name of the subnet.
- Resource
Id string The resource identifier for the subnet.
- allow
Public stringIp Indicates if this subnet allows public IP addresses. Possible values are
Allow,DefaultandDeny.- lab
Subnet stringName The name of the subnet.
- resource
Id string The resource identifier for the subnet.
- allow
Public strIp Indicates if this subnet allows public IP addresses. Possible values are
Allow,DefaultandDeny.- lab_
subnet_ strname 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.
- Lab
Subnet stringName The name of the subnet.
- Resource
Id string The resource identifier for the subnet.
- Use
In stringVm Creation Permission Indicates if the subnet can be used for VM creation. Possible values are
Allow,DefaultandDeny.- Use
Public stringIp Address Permission - Virtual
Network stringPool Name The virtual network pool associated with this subnet.
- Lab
Subnet stringName The name of the subnet.
- Resource
Id string The resource identifier for the subnet.
- Use
In stringVm Creation Permission Indicates if the subnet can be used for VM creation. Possible values are
Allow,DefaultandDeny.- Use
Public stringIp Address Permission - Virtual
Network stringPool Name The virtual network pool associated with this subnet.
- lab
Subnet stringName The name of the subnet.
- resource
Id string The resource identifier for the subnet.
- use
In stringVm Creation Permission Indicates if the subnet can be used for VM creation. Possible values are
Allow,DefaultandDeny.- use
Public stringIp Address Permission - virtual
Network stringPool Name The virtual network pool associated with this subnet.
- lab_
subnet_ strname The name of the subnet.
- resource_
id str The resource identifier for the subnet.
- use
In strVm Creation Permission Indicates if the subnet can be used for VM creation. Possible values are
Allow,DefaultandDeny.- use
Public strIp Address Permission - virtual
Network strPool Name 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
azurermTerraform Provider.