1. Packages
  2. Vcd Provider
  3. API Docs
  4. ExternalNetwork
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.ExternalNetwork

Explore with Pulumi AI

Create ExternalNetwork Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ExternalNetwork(name: string, args: ExternalNetworkArgs, opts?: CustomResourceOptions);
@overload
def ExternalNetwork(resource_name: str,
                    args: ExternalNetworkArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def ExternalNetwork(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    ip_scopes: Optional[Sequence[ExternalNetworkIpScopeArgs]] = None,
                    vsphere_networks: Optional[Sequence[ExternalNetworkVsphereNetworkArgs]] = None,
                    description: Optional[str] = None,
                    external_network_id: Optional[str] = None,
                    name: Optional[str] = None,
                    retain_net_info_across_deployments: Optional[bool] = None)
func NewExternalNetwork(ctx *Context, name string, args ExternalNetworkArgs, opts ...ResourceOption) (*ExternalNetwork, error)
public ExternalNetwork(string name, ExternalNetworkArgs args, CustomResourceOptions? opts = null)
public ExternalNetwork(String name, ExternalNetworkArgs args)
public ExternalNetwork(String name, ExternalNetworkArgs args, CustomResourceOptions options)
type: vcd:ExternalNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ExternalNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ExternalNetworkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ExternalNetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ExternalNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ExternalNetworkArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var externalNetworkResource = new Vcd.ExternalNetwork("externalNetworkResource", new()
{
    IpScopes = new[]
    {
        new Vcd.Inputs.ExternalNetworkIpScopeArgs
        {
            Gateway = "string",
            Netmask = "string",
            Dns1 = "string",
            Dns2 = "string",
            DnsSuffix = "string",
            StaticIpPools = new[]
            {
                new Vcd.Inputs.ExternalNetworkIpScopeStaticIpPoolArgs
                {
                    EndAddress = "string",
                    StartAddress = "string",
                },
            },
        },
    },
    VsphereNetworks = new[]
    {
        new Vcd.Inputs.ExternalNetworkVsphereNetworkArgs
        {
            Name = "string",
            Type = "string",
            Vcenter = "string",
        },
    },
    Description = "string",
    ExternalNetworkId = "string",
    Name = "string",
    RetainNetInfoAcrossDeployments = false,
});
Copy
example, err := vcd.NewExternalNetwork(ctx, "externalNetworkResource", &vcd.ExternalNetworkArgs{
	IpScopes: vcd.ExternalNetworkIpScopeArray{
		&vcd.ExternalNetworkIpScopeArgs{
			Gateway:   pulumi.String("string"),
			Netmask:   pulumi.String("string"),
			Dns1:      pulumi.String("string"),
			Dns2:      pulumi.String("string"),
			DnsSuffix: pulumi.String("string"),
			StaticIpPools: vcd.ExternalNetworkIpScopeStaticIpPoolArray{
				&vcd.ExternalNetworkIpScopeStaticIpPoolArgs{
					EndAddress:   pulumi.String("string"),
					StartAddress: pulumi.String("string"),
				},
			},
		},
	},
	VsphereNetworks: vcd.ExternalNetworkVsphereNetworkArray{
		&vcd.ExternalNetworkVsphereNetworkArgs{
			Name:    pulumi.String("string"),
			Type:    pulumi.String("string"),
			Vcenter: pulumi.String("string"),
		},
	},
	Description:                    pulumi.String("string"),
	ExternalNetworkId:              pulumi.String("string"),
	Name:                           pulumi.String("string"),
	RetainNetInfoAcrossDeployments: pulumi.Bool(false),
})
Copy
var externalNetworkResource = new ExternalNetwork("externalNetworkResource", ExternalNetworkArgs.builder()
    .ipScopes(ExternalNetworkIpScopeArgs.builder()
        .gateway("string")
        .netmask("string")
        .dns1("string")
        .dns2("string")
        .dnsSuffix("string")
        .staticIpPools(ExternalNetworkIpScopeStaticIpPoolArgs.builder()
            .endAddress("string")
            .startAddress("string")
            .build())
        .build())
    .vsphereNetworks(ExternalNetworkVsphereNetworkArgs.builder()
        .name("string")
        .type("string")
        .vcenter("string")
        .build())
    .description("string")
    .externalNetworkId("string")
    .name("string")
    .retainNetInfoAcrossDeployments(false)
    .build());
Copy
external_network_resource = vcd.ExternalNetwork("externalNetworkResource",
    ip_scopes=[{
        "gateway": "string",
        "netmask": "string",
        "dns1": "string",
        "dns2": "string",
        "dns_suffix": "string",
        "static_ip_pools": [{
            "end_address": "string",
            "start_address": "string",
        }],
    }],
    vsphere_networks=[{
        "name": "string",
        "type": "string",
        "vcenter": "string",
    }],
    description="string",
    external_network_id="string",
    name="string",
    retain_net_info_across_deployments=False)
Copy
const externalNetworkResource = new vcd.ExternalNetwork("externalNetworkResource", {
    ipScopes: [{
        gateway: "string",
        netmask: "string",
        dns1: "string",
        dns2: "string",
        dnsSuffix: "string",
        staticIpPools: [{
            endAddress: "string",
            startAddress: "string",
        }],
    }],
    vsphereNetworks: [{
        name: "string",
        type: "string",
        vcenter: "string",
    }],
    description: "string",
    externalNetworkId: "string",
    name: "string",
    retainNetInfoAcrossDeployments: false,
});
Copy
type: vcd:ExternalNetwork
properties:
    description: string
    externalNetworkId: string
    ipScopes:
        - dns1: string
          dns2: string
          dnsSuffix: string
          gateway: string
          netmask: string
          staticIpPools:
            - endAddress: string
              startAddress: string
    name: string
    retainNetInfoAcrossDeployments: false
    vsphereNetworks:
        - name: string
          type: string
          vcenter: string
Copy

ExternalNetwork Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ExternalNetwork resource accepts the following input properties:

IpScopes This property is required. List<ExternalNetworkIpScope>
A list of IP scopes for the network. See IP Scope below for details.
VsphereNetworks This property is required. List<ExternalNetworkVsphereNetwork>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
Description string
Network friendly description
ExternalNetworkId string
Name string
A unique name for the network
RetainNetInfoAcrossDeployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

IpScopes This property is required. []ExternalNetworkIpScopeArgs
A list of IP scopes for the network. See IP Scope below for details.
VsphereNetworks This property is required. []ExternalNetworkVsphereNetworkArgs
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
Description string
Network friendly description
ExternalNetworkId string
Name string
A unique name for the network
RetainNetInfoAcrossDeployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

ipScopes This property is required. List<ExternalNetworkIpScope>
A list of IP scopes for the network. See IP Scope below for details.
vsphereNetworks This property is required. List<ExternalNetworkVsphereNetwork>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description String
Network friendly description
externalNetworkId String
name String
A unique name for the network
retainNetInfoAcrossDeployments Boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

ipScopes This property is required. ExternalNetworkIpScope[]
A list of IP scopes for the network. See IP Scope below for details.
vsphereNetworks This property is required. ExternalNetworkVsphereNetwork[]
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description string
Network friendly description
externalNetworkId string
name string
A unique name for the network
retainNetInfoAcrossDeployments boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

ip_scopes This property is required. Sequence[ExternalNetworkIpScopeArgs]
A list of IP scopes for the network. See IP Scope below for details.
vsphere_networks This property is required. Sequence[ExternalNetworkVsphereNetworkArgs]
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description str
Network friendly description
external_network_id str
name str
A unique name for the network
retain_net_info_across_deployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

ipScopes This property is required. List<Property Map>
A list of IP scopes for the network. See IP Scope below for details.
vsphereNetworks This property is required. List<Property Map>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description String
Network friendly description
externalNetworkId String
name String
A unique name for the network
retainNetInfoAcrossDeployments Boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

Outputs

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

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

Look up Existing ExternalNetwork Resource

Get an existing ExternalNetwork 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?: ExternalNetworkState, opts?: CustomResourceOptions): ExternalNetwork
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        external_network_id: Optional[str] = None,
        ip_scopes: Optional[Sequence[ExternalNetworkIpScopeArgs]] = None,
        name: Optional[str] = None,
        retain_net_info_across_deployments: Optional[bool] = None,
        vsphere_networks: Optional[Sequence[ExternalNetworkVsphereNetworkArgs]] = None) -> ExternalNetwork
func GetExternalNetwork(ctx *Context, name string, id IDInput, state *ExternalNetworkState, opts ...ResourceOption) (*ExternalNetwork, error)
public static ExternalNetwork Get(string name, Input<string> id, ExternalNetworkState? state, CustomResourceOptions? opts = null)
public static ExternalNetwork get(String name, Output<String> id, ExternalNetworkState state, CustomResourceOptions options)
resources:  _:    type: vcd:ExternalNetwork    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
Network friendly description
ExternalNetworkId string
IpScopes List<ExternalNetworkIpScope>
A list of IP scopes for the network. See IP Scope below for details.
Name string
A unique name for the network
RetainNetInfoAcrossDeployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

VsphereNetworks List<ExternalNetworkVsphereNetwork>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
Description string
Network friendly description
ExternalNetworkId string
IpScopes []ExternalNetworkIpScopeArgs
A list of IP scopes for the network. See IP Scope below for details.
Name string
A unique name for the network
RetainNetInfoAcrossDeployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

VsphereNetworks []ExternalNetworkVsphereNetworkArgs
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description String
Network friendly description
externalNetworkId String
ipScopes List<ExternalNetworkIpScope>
A list of IP scopes for the network. See IP Scope below for details.
name String
A unique name for the network
retainNetInfoAcrossDeployments Boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

vsphereNetworks List<ExternalNetworkVsphereNetwork>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description string
Network friendly description
externalNetworkId string
ipScopes ExternalNetworkIpScope[]
A list of IP scopes for the network. See IP Scope below for details.
name string
A unique name for the network
retainNetInfoAcrossDeployments boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

vsphereNetworks ExternalNetworkVsphereNetwork[]
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description str
Network friendly description
external_network_id str
ip_scopes Sequence[ExternalNetworkIpScopeArgs]
A list of IP scopes for the network. See IP Scope below for details.
name str
A unique name for the network
retain_net_info_across_deployments bool

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

vsphere_networks Sequence[ExternalNetworkVsphereNetworkArgs]
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.
description String
Network friendly description
externalNetworkId String
ipScopes List<Property Map>
A list of IP scopes for the network. See IP Scope below for details.
name String
A unique name for the network
retainNetInfoAcrossDeployments Boolean

Specifies whether the network resources such as IP/MAC of router will be retained across deployments. Default is false.

vsphereNetworks List<Property Map>
A list of DV_PORTGROUP or NETWORK objects names that back this network. Each referenced DV_PORTGROUP or NETWORK must exist on a vCenter server registered with the system. See vSphere Network below for details.

Supporting Types

ExternalNetworkIpScope
, ExternalNetworkIpScopeArgs

Gateway This property is required. string
Gateway of the network
Netmask This property is required. string
Network mask
Dns1 string
Primary DNS server
Dns2 string
Secondary DNS server
DnsSuffix string
DNS suffix
StaticIpPools List<ExternalNetworkIpScopeStaticIpPool>
IP ranges used for static pool allocation in the network
Gateway This property is required. string
Gateway of the network
Netmask This property is required. string
Network mask
Dns1 string
Primary DNS server
Dns2 string
Secondary DNS server
DnsSuffix string
DNS suffix
StaticIpPools []ExternalNetworkIpScopeStaticIpPool
IP ranges used for static pool allocation in the network
gateway This property is required. String
Gateway of the network
netmask This property is required. String
Network mask
dns1 String
Primary DNS server
dns2 String
Secondary DNS server
dnsSuffix String
DNS suffix
staticIpPools List<ExternalNetworkIpScopeStaticIpPool>
IP ranges used for static pool allocation in the network
gateway This property is required. string
Gateway of the network
netmask This property is required. string
Network mask
dns1 string
Primary DNS server
dns2 string
Secondary DNS server
dnsSuffix string
DNS suffix
staticIpPools ExternalNetworkIpScopeStaticIpPool[]
IP ranges used for static pool allocation in the network
gateway This property is required. str
Gateway of the network
netmask This property is required. str
Network mask
dns1 str
Primary DNS server
dns2 str
Secondary DNS server
dns_suffix str
DNS suffix
static_ip_pools Sequence[ExternalNetworkIpScopeStaticIpPool]
IP ranges used for static pool allocation in the network
gateway This property is required. String
Gateway of the network
netmask This property is required. String
Network mask
dns1 String
Primary DNS server
dns2 String
Secondary DNS server
dnsSuffix String
DNS suffix
staticIpPools List<Property Map>
IP ranges used for static pool allocation in the network

ExternalNetworkIpScopeStaticIpPool
, ExternalNetworkIpScopeStaticIpPoolArgs

EndAddress This property is required. string
End address of the IP range
StartAddress This property is required. string
Start address of the IP range
EndAddress This property is required. string
End address of the IP range
StartAddress This property is required. string
Start address of the IP range
endAddress This property is required. String
End address of the IP range
startAddress This property is required. String
Start address of the IP range
endAddress This property is required. string
End address of the IP range
startAddress This property is required. string
Start address of the IP range
end_address This property is required. str
End address of the IP range
start_address This property is required. str
Start address of the IP range
endAddress This property is required. String
End address of the IP range
startAddress This property is required. String
Start address of the IP range

ExternalNetworkVsphereNetwork
, ExternalNetworkVsphereNetworkArgs

Name This property is required. string
A unique name for the network
Type This property is required. string
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
Vcenter This property is required. string
The vCenter server name
Name This property is required. string
A unique name for the network
Type This property is required. string
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
Vcenter This property is required. string
The vCenter server name
name This property is required. String
A unique name for the network
type This property is required. String
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
vcenter This property is required. String
The vCenter server name
name This property is required. string
A unique name for the network
type This property is required. string
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
vcenter This property is required. string
The vCenter server name
name This property is required. str
A unique name for the network
type This property is required. str
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
vcenter This property is required. str
The vCenter server name
name This property is required. String
A unique name for the network
type This property is required. String
The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
vcenter This property is required. String
The vCenter server name

Package Details

Repository
vcd vmware/terraform-provider-vcd
License
Notes
This Pulumi package is based on the vcd Terraform Provider.