VirtualNetwork

class VirtualNetwork : KotlinCustomResource

Manages a Virtual Network within a DevTest Lab.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.devtest.Lab;
import com.pulumi.azure.devtest.LabArgs;
import com.pulumi.azure.devtest.VirtualNetwork;
import com.pulumi.azure.devtest.VirtualNetworkArgs;
import com.pulumi.azure.devtest.inputs.VirtualNetworkSubnetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleLab = new Lab("exampleLab", LabArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.tags(Map.of("Sydney", "Australia"))
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.labName(exampleLab.name())
.resourceGroupName(exampleResourceGroup.name())
.subnet(VirtualNetworkSubnetArgs.builder()
.usePublicIpAddress("Allow")
.useInVirtualMachineCreation("Allow")
.build())
.build());
}
}

Import

DevTest Virtual Networks can be imported using the resource id, e.g.

$ pulumi import azure:devtest/virtualNetwork:VirtualNetwork network1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualNetworks/network1

Properties

Link copied to clipboard
val description: Output<String>?

A description for the Virtual Network.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labName: Output<String>

Specifies the name of the Dev Test Lab in which the Virtual Network should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

Specifies the name of the Dev Test Virtual Network. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.

Link copied to clipboard

A subnet block as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A mapping of tags to assign to the resource.

Link copied to clipboard

The unique immutable identifier of the Dev Test Virtual Network.

Link copied to clipboard
val urn: Output<String>