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

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    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 string
    The unique name of the resource.
    args ExternalNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args ExternalNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExternalNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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,
    });
    
    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),
    })
    
    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());
    
    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)
    
    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,
    });
    
    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
    

    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 List<ExternalNetworkIpScope>
    A list of IP scopes for the network. See IP Scope below for details.
    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
    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 []ExternalNetworkIpScopeArgs
    A list of IP scopes for the network. See IP Scope below for details.
    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
    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 List<ExternalNetworkIpScope>
    A list of IP scopes for the network. See IP Scope below for details.
    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
    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 ExternalNetworkIpScope[]
    A list of IP scopes for the network. See IP Scope below for details.
    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 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 Sequence[ExternalNetworkIpScopeArgs]
    A list of IP scopes for the network. See IP Scope below for details.
    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 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 List<Property Map>
    A list of IP scopes for the network. See IP Scope below for details.
    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.
    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
    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.
    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:
    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 string
    Gateway of the network
    Netmask 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 string
    Gateway of the network
    Netmask 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 String
    Gateway of the network
    netmask 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 string
    Gateway of the network
    netmask 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 str
    Gateway of the network
    netmask 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 String
    Gateway of the network
    netmask 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 string
    End address of the IP range
    StartAddress string
    Start address of the IP range
    EndAddress string
    End address of the IP range
    StartAddress string
    Start address of the IP range
    endAddress String
    End address of the IP range
    startAddress String
    Start address of the IP range
    endAddress string
    End address of the IP range
    startAddress string
    Start address of the IP range
    end_address str
    End address of the IP range
    start_address str
    Start address of the IP range
    endAddress String
    End address of the IP range
    startAddress String
    Start address of the IP range

    ExternalNetworkVsphereNetwork, ExternalNetworkVsphereNetworkArgs

    Name string
    A unique name for the network
    Type string
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    Vcenter string
    The vCenter server name
    Name string
    A unique name for the network
    Type string
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    Vcenter string
    The vCenter server name
    name String
    A unique name for the network
    type String
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    vcenter String
    The vCenter server name
    name string
    A unique name for the network
    type string
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    vcenter string
    The vCenter server name
    name str
    A unique name for the network
    type str
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    vcenter str
    The vCenter server name
    name String
    A unique name for the network
    type String
    The vSphere port group type. One of: DV_PORTGROUP (distributed virtual port group), NETWORK
    vcenter 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.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware