Class VirtualNetwork
Manages a virtual network including any configured subnets. Each subnet can optionally be configured with a security group to be associated with the subnet.
NOTE on Virtual Networks and Subnet's: This provider currently provides both a standalone Subnet resource, and allows for Subnets to be defined in-line within the Virtual Network resource. At this time you cannot use a Virtual Network with in-line Subnets in conjunction with any Subnet resources. Doing so will cause a conflict of Subnet configurations and will overwrite Subnet's.
Inherited Members
Namespace: Pulumi.Azure.Network
Assembly: Pulumi.Azure.dll
Syntax
public class VirtualNetwork : CustomResource
Constructors
View SourceVirtualNetwork(String, VirtualNetworkArgs, CustomResourceOptions)
Create a VirtualNetwork resource with the given unique name, arguments, and options.
Declaration
public VirtualNetwork(string name, VirtualNetworkArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VirtualNetworkArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAddressSpaces
The address space that is used the virtual network. You can supply more than one address space. Changing this forces a new resource to be created.
Declaration
public Output<ImmutableArray<string>> AddressSpaces { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
DdosProtectionPlan
A ddos_protection_plan block as documented below.
Declaration
public Output<VirtualNetworkDdosProtectionPlan> DdosProtectionPlan { get; }
Property Value
| Type | Description |
|---|---|
| Output<VirtualNetworkDdosProtectionPlan> |
DnsServers
List of IP addresses of DNS servers
Declaration
public Output<ImmutableArray<string>> DnsServers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Guid
The GUID of the virtual network.
Declaration
public Output<string> Guid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Location
The location/region where the virtual network is created. Changing this forces a new resource to be created.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the virtual network. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which to create the virtual network.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Subnets
Can be specified multiple times to define multiple
subnets. Each subnet block supports fields documented below.
Declaration
public Output<ImmutableArray<VirtualNetworkSubnet>> Subnets { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<VirtualNetworkSubnet>> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Methods
View SourceGet(String, Input<String>, VirtualNetworkState, CustomResourceOptions)
Get an existing VirtualNetwork resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static VirtualNetwork Get(string name, Input<string> id, VirtualNetworkState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VirtualNetworkState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| VirtualNetwork |