vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNetworkIsolatedV2
Explore with Pulumi AI
Provides a VMware Cloud Director Org VDC isolated Network data source to read data or reference existing network.
Supported in provider v3.2+ for both NSX-T and NSX-V VDCs.
Example Usage
Looking Up Isolated Network In VDC)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const main = vcd.getOrgVdc({
org: "my-org",
name: "main-edge",
});
const net = main.then(main => vcd.getNetworkIsolatedV2({
org: "my-org",
ownerId: main.id,
name: "my-net",
}));
import pulumi
import pulumi_vcd as vcd
main = vcd.get_org_vdc(org="my-org",
name="main-edge")
net = vcd.get_network_isolated_v2(org="my-org",
owner_id=main.id,
name="my-net")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
Org: pulumi.StringRef("my-org"),
Name: "main-edge",
}, nil)
if err != nil {
return err
}
_, err = vcd.LookupNetworkIsolatedV2(ctx, &vcd.LookupNetworkIsolatedV2Args{
Org: pulumi.StringRef("my-org"),
OwnerId: pulumi.StringRef(main.Id),
Name: pulumi.StringRef("my-net"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var main = Vcd.GetOrgVdc.Invoke(new()
{
Org = "my-org",
Name = "main-edge",
});
var net = Vcd.GetNetworkIsolatedV2.Invoke(new()
{
Org = "my-org",
OwnerId = main.Apply(getOrgVdcResult => getOrgVdcResult.Id),
Name = "my-net",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetOrgVdcArgs;
import com.pulumi.vcd.inputs.GetNetworkIsolatedV2Args;
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) {
final var main = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
.org("my-org")
.name("main-edge")
.build());
final var net = VcdFunctions.getNetworkIsolatedV2(GetNetworkIsolatedV2Args.builder()
.org("my-org")
.ownerId(main.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
.name("my-net")
.build());
}
}
variables:
main:
fn::invoke:
function: vcd:getOrgVdc
arguments:
org: my-org
name: main-edge
net:
fn::invoke:
function: vcd:getNetworkIsolatedV2
arguments:
org: my-org
ownerId: ${main.id}
name: my-net
Looking Up Isolated Network In VDC Group)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const main = vcd.getVdcGroup({
org: "my-org",
name: "main-group",
});
const net = main.then(main => vcd.getNetworkIsolatedV2({
org: "my-org",
ownerId: main.id,
name: "my-net",
}));
import pulumi
import pulumi_vcd as vcd
main = vcd.get_vdc_group(org="my-org",
name="main-group")
net = vcd.get_network_isolated_v2(org="my-org",
owner_id=main.id,
name="my-net")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
Org: pulumi.StringRef("my-org"),
Name: pulumi.StringRef("main-group"),
}, nil)
if err != nil {
return err
}
_, err = vcd.LookupNetworkIsolatedV2(ctx, &vcd.LookupNetworkIsolatedV2Args{
Org: pulumi.StringRef("my-org"),
OwnerId: pulumi.StringRef(main.Id),
Name: pulumi.StringRef("my-net"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var main = Vcd.GetVdcGroup.Invoke(new()
{
Org = "my-org",
Name = "main-group",
});
var net = Vcd.GetNetworkIsolatedV2.Invoke(new()
{
Org = "my-org",
OwnerId = main.Apply(getVdcGroupResult => getVdcGroupResult.Id),
Name = "my-net",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetVdcGroupArgs;
import com.pulumi.vcd.inputs.GetNetworkIsolatedV2Args;
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) {
final var main = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
.org("my-org")
.name("main-group")
.build());
final var net = VcdFunctions.getNetworkIsolatedV2(GetNetworkIsolatedV2Args.builder()
.org("my-org")
.ownerId(main.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
.name("my-net")
.build());
}
}
variables:
main:
fn::invoke:
function: vcd:getVdcGroup
arguments:
org: my-org
name: main-group
net:
fn::invoke:
function: vcd:getNetworkIsolatedV2
arguments:
org: my-org
ownerId: ${main.id}
name: my-net
Filter arguments
name_regex
- (Optional) matches the name using a regular expression.ip
- (Optional) matches the IP of the resource using a regular expression.
See Filters reference for details and examples.
Using getNetworkIsolatedV2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNetworkIsolatedV2(args: GetNetworkIsolatedV2Args, opts?: InvokeOptions): Promise<GetNetworkIsolatedV2Result>
function getNetworkIsolatedV2Output(args: GetNetworkIsolatedV2OutputArgs, opts?: InvokeOptions): Output<GetNetworkIsolatedV2Result>
def get_network_isolated_v2(filter: Optional[GetNetworkIsolatedV2Filter] = None,
id: Optional[str] = None,
name: Optional[str] = None,
org: Optional[str] = None,
owner_id: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkIsolatedV2Result
def get_network_isolated_v2_output(filter: Optional[pulumi.Input[GetNetworkIsolatedV2FilterArgs]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
owner_id: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkIsolatedV2Result]
func LookupNetworkIsolatedV2(ctx *Context, args *LookupNetworkIsolatedV2Args, opts ...InvokeOption) (*LookupNetworkIsolatedV2Result, error)
func LookupNetworkIsolatedV2Output(ctx *Context, args *LookupNetworkIsolatedV2OutputArgs, opts ...InvokeOption) LookupNetworkIsolatedV2ResultOutput
> Note: This function is named LookupNetworkIsolatedV2
in the Go SDK.
public static class GetNetworkIsolatedV2
{
public static Task<GetNetworkIsolatedV2Result> InvokeAsync(GetNetworkIsolatedV2Args args, InvokeOptions? opts = null)
public static Output<GetNetworkIsolatedV2Result> Invoke(GetNetworkIsolatedV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkIsolatedV2Result> getNetworkIsolatedV2(GetNetworkIsolatedV2Args args, InvokeOptions options)
public static Output<GetNetworkIsolatedV2Result> getNetworkIsolatedV2(GetNetworkIsolatedV2Args args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNetworkIsolatedV2:getNetworkIsolatedV2
arguments:
# arguments dictionary
The following arguments are supported:
- Filter
Get
Network Isolated V2Filter - Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- Id string
- Name string
- A unique name for the network (optional when
filter
is used) - Org string
- The name of organization to use, optional if defined at provider level
- Owner
Id string - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - Vdc string
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
- Filter
Get
Network Isolated V2Filter - Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- Id string
- Name string
- A unique name for the network (optional when
filter
is used) - Org string
- The name of organization to use, optional if defined at provider level
- Owner
Id string - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - Vdc string
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
- filter
Get
Network Isolated V2Filter - Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- id String
- name String
- A unique name for the network (optional when
filter
is used) - org String
- The name of organization to use, optional if defined at provider level
- owner
Id String - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - vdc String
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
- filter
Get
Network Isolated V2Filter - Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- id string
- name string
- A unique name for the network (optional when
filter
is used) - org string
- The name of organization to use, optional if defined at provider level
- owner
Id string - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - vdc string
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
- filter
Get
Network Isolated V2Filter - Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- id str
- name str
- A unique name for the network (optional when
filter
is used) - org str
- The name of organization to use, optional if defined at provider level
- owner_
id str - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - vdc str
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
- filter Property Map
- Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
- id String
- name String
- A unique name for the network (optional when
filter
is used) - org String
- The name of organization to use, optional if defined at provider level
- owner
Id String - VDC or VDC Group ID. Always takes precedence over
vdc
fields (in resource and inherited from provider configuration) - vdc String
- The name of VDC to use. Deprecated in favor of new field
owner_id
which supports VDC and VDC Group IDs.
getNetworkIsolatedV2 Result
The following output properties are available:
- Description string
- Dns1 string
- Dns2 string
- Dns
Suffix string - Dual
Stack boolEnabled - Gateway string
- Guest
Vlan boolAllowed - Id string
- bool
- Metadata Dictionary<string, string>
- Metadata
Entries List<GetNetwork Isolated V2Metadata Entry> - Owner
Id string - Prefix
Length double - Secondary
Gateway string - Secondary
Prefix stringLength - Secondary
Static List<GetIp Pools Network Isolated V2Secondary Static Ip Pool> - Static
Ip List<GetPools Network Isolated V2Static Ip Pool> - Vdc string
- Filter
Get
Network Isolated V2Filter - Name string
- Org string
- Description string
- Dns1 string
- Dns2 string
- Dns
Suffix string - Dual
Stack boolEnabled - Gateway string
- Guest
Vlan boolAllowed - Id string
- bool
- Metadata map[string]string
- Metadata
Entries []GetNetwork Isolated V2Metadata Entry - Owner
Id string - Prefix
Length float64 - Secondary
Gateway string - Secondary
Prefix stringLength - Secondary
Static []GetIp Pools Network Isolated V2Secondary Static Ip Pool - Static
Ip []GetPools Network Isolated V2Static Ip Pool - Vdc string
- Filter
Get
Network Isolated V2Filter - Name string
- Org string
- description String
- dns1 String
- dns2 String
- dns
Suffix String - dual
Stack BooleanEnabled - gateway String
- guest
Vlan BooleanAllowed - id String
- Boolean
- metadata Map<String,String>
- metadata
Entries List<GetNetwork Isolated V2Metadata Entry> - owner
Id String - prefix
Length Double - secondary
Gateway String - secondary
Prefix StringLength - secondary
Static List<GetIp Pools Network Isolated V2Secondary Static Ip Pool> - static
Ip List<GetPools Network Isolated V2Static Ip Pool> - vdc String
- filter
Get
Network Isolated V2Filter - name String
- org String
- description string
- dns1 string
- dns2 string
- dns
Suffix string - dual
Stack booleanEnabled - gateway string
- guest
Vlan booleanAllowed - id string
- boolean
- metadata {[key: string]: string}
- metadata
Entries GetNetwork Isolated V2Metadata Entry[] - owner
Id string - prefix
Length number - secondary
Gateway string - secondary
Prefix stringLength - secondary
Static GetIp Pools Network Isolated V2Secondary Static Ip Pool[] - static
Ip GetPools Network Isolated V2Static Ip Pool[] - vdc string
- filter
Get
Network Isolated V2Filter - name string
- org string
- description str
- dns1 str
- dns2 str
- dns_
suffix str - dual_
stack_ boolenabled - gateway str
- guest_
vlan_ boolallowed - id str
- bool
- metadata Mapping[str, str]
- metadata_
entries Sequence[GetNetwork Isolated V2Metadata Entry] - owner_
id str - prefix_
length float - secondary_
gateway str - secondary_
prefix_ strlength - secondary_
static_ Sequence[Getip_ pools Network Isolated V2Secondary Static Ip Pool] - static_
ip_ Sequence[Getpools Network Isolated V2Static Ip Pool] - vdc str
- filter
Get
Network Isolated V2Filter - name str
- org str
- description String
- dns1 String
- dns2 String
- dns
Suffix String - dual
Stack BooleanEnabled - gateway String
- guest
Vlan BooleanAllowed - id String
- Boolean
- metadata Map<String>
- metadata
Entries List<Property Map> - owner
Id String - prefix
Length Number - secondary
Gateway String - secondary
Prefix StringLength - secondary
Static List<Property Map>Ip Pools - static
Ip List<Property Map>Pools - vdc String
- filter Property Map
- name String
- org String
Supporting Types
GetNetworkIsolatedV2Filter
- ip str
- Search by IP. The value can be a regular expression
- name_
regex str - Search by name with a regular expression
GetNetworkIsolatedV2MetadataEntry
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- is
System Boolean - key String
- type String
- user
Access String - value String
- is
System boolean - key string
- type string
- user
Access string - value string
- is_
system bool - key str
- type str
- user_
access str - value str
- is
System Boolean - key String
- type String
- user
Access String - value String
GetNetworkIsolatedV2SecondaryStaticIpPool
- End
Address string - Start
Address string
- End
Address string - Start
Address string
- end
Address String - start
Address String
- end
Address string - start
Address string
- end_
address str - start_
address str
- end
Address String - start
Address String
GetNetworkIsolatedV2StaticIpPool
- End
Address string - Start
Address string
- End
Address string - Start
Address string
- end
Address String - start
Address String
- end
Address string - start
Address string
- end_
address str - start_
address str
- end
Address String - start
Address String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.