vra 0.12.0 published on Monday, Apr 14, 2025 by vmware
vra.getNetwork
Explore with Pulumi AI
—layout: “vra”
page_title: “VMware vRealize Automation: vra.Network” description: |- Provides a data lookup for vra_network.
Data Source: vra.Network
Example Usage
S
This is an example of how to read a network data source.
Network data source by id:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const test_network = vra.getNetwork({
    id: _var.network_id,
});
import pulumi
import pulumi_vra as vra
test_network = vra.get_network(id=var["network_id"])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vra.LookupNetwork(ctx, &vra.LookupNetworkArgs{
			Id: pulumi.StringRef(_var.Network_id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() => 
{
    var test_network = Vra.GetNetwork.Invoke(new()
    {
        Id = @var.Network_id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetNetworkArgs;
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 test-network = VraFunctions.getNetwork(GetNetworkArgs.builder()
            .id(var_.network_id())
            .build());
    }
}
variables:
  test-network:
    fn::invoke:
      function: vra:getNetwork
      arguments:
        id: ${var.network_id}
Network data source by name:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const test_network = vra.getNetwork({
    name: _var.network_name,
});
import pulumi
import pulumi_vra as vra
test_network = vra.get_network(name=var["network_name"])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vra.LookupNetwork(ctx, &vra.LookupNetworkArgs{
			Name: pulumi.StringRef(_var.Network_name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() => 
{
    var test_network = Vra.GetNetwork.Invoke(new()
    {
        Name = @var.Network_name,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetNetworkArgs;
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 test-network = VraFunctions.getNetwork(GetNetworkArgs.builder()
            .name(var_.network_name())
            .build());
    }
}
variables:
  test-network:
    fn::invoke:
      function: vra:getNetwork
      arguments:
        name: ${var.network_name}
Network data source by filter:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const test_network = vra.getNetwork({
    filter: `name eq '${_var.network_name}'`,
});
import pulumi
import pulumi_vra as vra
test_network = vra.get_network(filter=f"name eq '{var['network_name']}'")
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vra.LookupNetwork(ctx, &vra.LookupNetworkArgs{
			Filter: pulumi.StringRef(fmt.Sprintf("name eq '%v'", _var.Network_name)),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() => 
{
    var test_network = Vra.GetNetwork.Invoke(new()
    {
        Filter = $"name eq '{@var.Network_name}'",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetNetworkArgs;
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 test-network = VraFunctions.getNetwork(GetNetworkArgs.builder()
            .filter(String.format("name eq '%s'", var_.network_name()))
            .build());
    }
}
variables:
  test-network:
    fn::invoke:
      function: vra:getNetwork
      arguments:
        filter: name eq '${var.network_name}'
Using getNetwork
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 getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>def get_network(filter: Optional[str] = None,
                id: Optional[str] = None,
                name: Optional[str] = None,
                tags: Optional[Sequence[GetNetworkTag]] = None,
                opts: Optional[InvokeOptions] = None) -> GetNetworkResult
def get_network_output(filter: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkTagArgs]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput> Note: This function is named LookupNetwork in the Go SDK.
public static class GetNetwork 
{
    public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
fn::invoke:
  function: vra:index/getNetwork:getNetwork
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filter string
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- Id string
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- Name string
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- 
List<GetNetwork Tag> 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- Filter string
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- Id string
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- Name string
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- 
[]GetNetwork Tag 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- filter String
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- id String
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- name String
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- 
List<GetNetwork Tag> 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- filter string
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- id string
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- name string
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- 
GetNetwork Tag[] 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- filter str
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- id str
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- name str
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- 
Sequence[GetNetwork Tag] 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- filter String
- The search criteria to narrow down the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- id String
- The id of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- name String
- The human-friendly name of the network instance. Only one of 'id', 'name' or 'filter' must be specified.
- List<Property Map>
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
getNetwork Result
The following output properties are available:
- Cidr string
- IPv4 address range of the network in CIDR format.
- CloudAccount List<string>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- CustomProperties Dictionary<string, string>
- Additional properties that may be used to extend the base resource.
- DeploymentId string
- Deployment id that is associated with this resource.
- Description string
- A human-friendly description.
- ExternalId string
- External entity Id on the provider side.
- ExternalRegion stringId 
- The external regionId of the resource.
- ExternalZone stringId 
- The external zoneId of the resource.
- Id string
- Links
List<GetNetwork Link> 
- HATEOAS of the entity
- Name string
- OrganizationId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user or display name of the group that owns the entity.
- ProjectId string
- The id of the project this resource belongs to.
- UpdatedAt string
- Filter string
- 
List<GetNetwork Tag> 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- Cidr string
- IPv4 address range of the network in CIDR format.
- CloudAccount []stringIds 
- Set of ids of the cloud accounts this resource belongs to.
- CustomProperties map[string]string
- Additional properties that may be used to extend the base resource.
- DeploymentId string
- Deployment id that is associated with this resource.
- Description string
- A human-friendly description.
- ExternalId string
- External entity Id on the provider side.
- ExternalRegion stringId 
- The external regionId of the resource.
- ExternalZone stringId 
- The external zoneId of the resource.
- Id string
- Links
[]GetNetwork Link 
- HATEOAS of the entity
- Name string
- OrganizationId string
- The id of the organization this entity belongs to.
- Owner string
- Email of the user or display name of the group that owns the entity.
- ProjectId string
- The id of the project this resource belongs to.
- UpdatedAt string
- Filter string
- 
[]GetNetwork Tag 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- cidr String
- IPv4 address range of the network in CIDR format.
- cloudAccount List<String>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- customProperties Map<String,String>
- Additional properties that may be used to extend the base resource.
- deploymentId String
- Deployment id that is associated with this resource.
- description String
- A human-friendly description.
- externalId String
- External entity Id on the provider side.
- externalRegion StringId 
- The external regionId of the resource.
- externalZone StringId 
- The external zoneId of the resource.
- id String
- links
List<GetNetwork Link> 
- HATEOAS of the entity
- name String
- organizationId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user or display name of the group that owns the entity.
- projectId String
- The id of the project this resource belongs to.
- updatedAt String
- filter String
- 
List<GetNetwork Tag> 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- cidr string
- IPv4 address range of the network in CIDR format.
- cloudAccount string[]Ids 
- Set of ids of the cloud accounts this resource belongs to.
- customProperties {[key: string]: string}
- Additional properties that may be used to extend the base resource.
- deploymentId string
- Deployment id that is associated with this resource.
- description string
- A human-friendly description.
- externalId string
- External entity Id on the provider side.
- externalRegion stringId 
- The external regionId of the resource.
- externalZone stringId 
- The external zoneId of the resource.
- id string
- links
GetNetwork Link[] 
- HATEOAS of the entity
- name string
- organizationId string
- The id of the organization this entity belongs to.
- owner string
- Email of the user or display name of the group that owns the entity.
- projectId string
- The id of the project this resource belongs to.
- updatedAt string
- filter string
- 
GetNetwork Tag[] 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- cidr str
- IPv4 address range of the network in CIDR format.
- cloud_account_ Sequence[str]ids 
- Set of ids of the cloud accounts this resource belongs to.
- custom_properties Mapping[str, str]
- Additional properties that may be used to extend the base resource.
- deployment_id str
- Deployment id that is associated with this resource.
- description str
- A human-friendly description.
- external_id str
- External entity Id on the provider side.
- external_region_ strid 
- The external regionId of the resource.
- external_zone_ strid 
- The external zoneId of the resource.
- id str
- links
Sequence[GetNetwork Link] 
- HATEOAS of the entity
- name str
- organization_id str
- The id of the organization this entity belongs to.
- owner str
- Email of the user or display name of the group that owns the entity.
- project_id str
- The id of the project this resource belongs to.
- updated_at str
- filter str
- 
Sequence[GetNetwork Tag] 
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
- cidr String
- IPv4 address range of the network in CIDR format.
- cloudAccount List<String>Ids 
- Set of ids of the cloud accounts this resource belongs to.
- customProperties Map<String>
- Additional properties that may be used to extend the base resource.
- deploymentId String
- Deployment id that is associated with this resource.
- description String
- A human-friendly description.
- externalId String
- External entity Id on the provider side.
- externalRegion StringId 
- The external regionId of the resource.
- externalZone StringId 
- The external zoneId of the resource.
- id String
- links List<Property Map>
- HATEOAS of the entity
- name String
- organizationId String
- The id of the organization this entity belongs to.
- owner String
- Email of the user or display name of the group that owns the entity.
- projectId String
- The id of the project this resource belongs to.
- updatedAt String
- filter String
- List<Property Map>
- A set of tag keys and optional values that were set on this resource.
example: [ { "key" : "ownedBy", "value": "Rainpole" } ]
Supporting Types
GetNetworkLink  
GetNetworkTag  
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the vraTerraform Provider.