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.

Create a VirtualNetwork Resource

def VirtualNetwork(resource_name, opts=None, address_spaces=None, ddos_protection_plan=None, dns_servers=None, location=None, name=None, resource_group_name=None, subnets=None, tags=None, __props__=None);
name string
The unique name of the resource.
args VirtualNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VirtualNetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VirtualNetwork Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VirtualNetwork resource accepts the following input properties:

AddressSpaces List<string>

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.

ResourceGroupName string

The name of the resource group in which to create the virtual network.

DdosProtectionPlan VirtualNetworkDdosProtectionPlanArgs

A ddos_protection_plan block as documented below.

DnsServers List<string>

List of IP addresses of DNS servers

Location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

Subnets List<VirtualNetworkSubnetArgs>

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

AddressSpaces []string

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.

ResourceGroupName string

The name of the resource group in which to create the virtual network.

DdosProtectionPlan VirtualNetworkDdosProtectionPlan

A ddos_protection_plan block as documented below.

DnsServers []string

List of IP addresses of DNS servers

Location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

Subnets []VirtualNetworkSubnet

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

Tags map[string]string

A mapping of tags to assign to the resource.

addressSpaces string[]

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.

resourceGroupName string

The name of the resource group in which to create the virtual network.

ddosProtectionPlan VirtualNetworkDdosProtectionPlan

A ddos_protection_plan block as documented below.

dnsServers string[]

List of IP addresses of DNS servers

location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

name string

The name of the virtual network. Changing this forces a new resource to be created.

subnets VirtualNetworkSubnet[]

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

address_spaces List[str]

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.

resource_group_name str

The name of the resource group in which to create the virtual network.

ddos_protection_plan Dict[VirtualNetworkDdosProtectionPlan]

A ddos_protection_plan block as documented below.

dns_servers List[str]

List of IP addresses of DNS servers

location str

The location/region where the virtual network is created. Changing this forces a new resource to be created.

name str

The name of the virtual network. Changing this forces a new resource to be created.

subnets List[VirtualNetworkSubnet]

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualNetwork resource produces the following output properties:

Guid string

The GUID of the virtual network.

Id string
The provider-assigned unique ID for this managed resource.
Guid string

The GUID of the virtual network.

Id string
The provider-assigned unique ID for this managed resource.
guid string

The GUID of the virtual network.

id string
The provider-assigned unique ID for this managed resource.
guid str

The GUID of the virtual network.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing VirtualNetwork Resource

Get an existing VirtualNetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VirtualNetworkState, opts?: CustomResourceOptions): VirtualNetwork
static get(resource_name, id, opts=None, address_spaces=None, ddos_protection_plan=None, dns_servers=None, guid=None, location=None, name=None, resource_group_name=None, subnets=None, tags=None, __props__=None);
func GetVirtualNetwork(ctx *Context, name string, id IDInput, state *VirtualNetworkState, opts ...ResourceOption) (*VirtualNetwork, error)
public static VirtualNetwork Get(string name, Input<string> id, VirtualNetworkState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AddressSpaces List<string>

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.

DdosProtectionPlan VirtualNetworkDdosProtectionPlanArgs

A ddos_protection_plan block as documented below.

DnsServers List<string>

List of IP addresses of DNS servers

Guid string

The GUID of the virtual network.

Location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the virtual network.

Subnets List<VirtualNetworkSubnetArgs>

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

AddressSpaces []string

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.

DdosProtectionPlan VirtualNetworkDdosProtectionPlan

A ddos_protection_plan block as documented below.

DnsServers []string

List of IP addresses of DNS servers

Guid string

The GUID of the virtual network.

Location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the virtual network.

Subnets []VirtualNetworkSubnet

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

Tags map[string]string

A mapping of tags to assign to the resource.

addressSpaces string[]

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.

ddosProtectionPlan VirtualNetworkDdosProtectionPlan

A ddos_protection_plan block as documented below.

dnsServers string[]

List of IP addresses of DNS servers

guid string

The GUID of the virtual network.

location string

The location/region where the virtual network is created. Changing this forces a new resource to be created.

name string

The name of the virtual network. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the virtual network.

subnets VirtualNetworkSubnet[]

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

address_spaces List[str]

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.

ddos_protection_plan Dict[VirtualNetworkDdosProtectionPlan]

A ddos_protection_plan block as documented below.

dns_servers List[str]

List of IP addresses of DNS servers

guid str

The GUID of the virtual network.

location str

The location/region where the virtual network is created. Changing this forces a new resource to be created.

name str

The name of the virtual network. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the virtual network.

subnets List[VirtualNetworkSubnet]

Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Supporting Types

VirtualNetworkDdosProtectionPlan

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enable bool

Enable/disable DDoS Protection Plan on Virtual Network.

Id string

The Resource ID of DDoS Protection Plan.

Enable bool

Enable/disable DDoS Protection Plan on Virtual Network.

Id string

The Resource ID of DDoS Protection Plan.

enable boolean

Enable/disable DDoS Protection Plan on Virtual Network.

id string

The Resource ID of DDoS Protection Plan.

enable bool

Enable/disable DDoS Protection Plan on Virtual Network.

id str

The Resource ID of DDoS Protection Plan.

VirtualNetworkSubnet

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AddressPrefix string

The address prefix to use for the subnet.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

Id string

The Resource ID of DDoS Protection Plan.

SecurityGroup string

The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id)

AddressPrefix string

The address prefix to use for the subnet.

Name string

The name of the virtual network. Changing this forces a new resource to be created.

Id string

The Resource ID of DDoS Protection Plan.

SecurityGroup string

The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id)

addressPrefix string

The address prefix to use for the subnet.

name string

The name of the virtual network. Changing this forces a new resource to be created.

id string

The Resource ID of DDoS Protection Plan.

securityGroup string

The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id)

address_prefix str

The address prefix to use for the subnet.

name str

The name of the virtual network. Changing this forces a new resource to be created.

id str

The Resource ID of DDoS Protection Plan.

securityGroup str

The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id)

Package Details

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