GetNetwork

Use this data source to get the ID of an available OpenStack network.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var network = Output.Create(OpenStack.Networking.GetNetwork.InvokeAsync(new OpenStack.Networking.GetNetworkArgs
        {
            Name = "tf_test_network",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network = openstack.networking.get_network(name="tf_test_network")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network = pulumi.output(openstack.networking.getNetwork({
    name: "tf_test_network",
}, { async: true }));

Using GetNetwork

function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function  get_network(description=None, external=None, matching_subnet_cidr=None, mtu=None, name=None, network_id=None, region=None, status=None, tags=None, tenant_id=None, transparent_vlan=None, opts=None)
func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)

Note: This function is named LookupNetwork in the Go SDK.

public static class GetNetwork {
    public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Description string

Human-readable description of the network.

External bool

The external routing facility of the network.

MatchingSubnetCidr string

The CIDR of a subnet within the network.

Mtu int

The network MTU to filter. Available, when Neutron net-mtu extension is enabled.

Name string

The name of the network.

NetworkId string

The ID of the network.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve networks ids. If omitted, the region argument of the provider is used.

Status string

The status of the network.

Tags List<string>

The list of network tags to filter.

TenantId string

The owner of the network.

TransparentVlan bool

The VLAN transparent attribute for the network.

Description string

Human-readable description of the network.

External bool

The external routing facility of the network.

MatchingSubnetCidr string

The CIDR of a subnet within the network.

Mtu int

The network MTU to filter. Available, when Neutron net-mtu extension is enabled.

Name string

The name of the network.

NetworkId string

The ID of the network.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve networks ids. If omitted, the region argument of the provider is used.

Status string

The status of the network.

Tags []string

The list of network tags to filter.

TenantId string

The owner of the network.

TransparentVlan bool

The VLAN transparent attribute for the network.

description string

Human-readable description of the network.

external boolean

The external routing facility of the network.

matchingSubnetCidr string

The CIDR of a subnet within the network.

mtu number

The network MTU to filter. Available, when Neutron net-mtu extension is enabled.

name string

The name of the network.

networkId string

The ID of the network.

region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve networks ids. If omitted, the region argument of the provider is used.

status string

The status of the network.

tags string[]

The list of network tags to filter.

tenantId string

The owner of the network.

transparentVlan boolean

The VLAN transparent attribute for the network.

description str

Human-readable description of the network.

external bool

The external routing facility of the network.

matching_subnet_cidr str

The CIDR of a subnet within the network.

mtu float

The network MTU to filter. Available, when Neutron net-mtu extension is enabled.

name str

The name of the network.

network_id str

The ID of the network.

region str

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve networks ids. If omitted, the region argument of the provider is used.

status str

The status of the network.

tags List[str]

The list of network tags to filter.

tenant_id str

The owner of the network.

transparent_vlan bool

The VLAN transparent attribute for the network.

GetNetwork Result

The following output properties are available:

AdminStateUp string

The administrative state of the network.

AllTags List<string>

The set of string tags applied on the network.

AvailabilityZoneHints List<string>

The availability zone candidates for the network.

DnsDomain string

The network DNS domain. Available, when Neutron DNS extension is enabled

Id string

The provider-assigned unique ID for this managed resource.

Region string

See Argument Reference above.

Shared string

Specifies whether the network resource can be accessed by any tenant or not.

Description string

See Argument Reference above.

External bool

See Argument Reference above.

MatchingSubnetCidr string
Mtu int

See Argument Reference above.

Name string

See Argument Reference above.

NetworkId string
Status string
Tags List<string>
TenantId string
TransparentVlan bool

See Argument Reference above.

AdminStateUp string

The administrative state of the network.

AllTags []string

The set of string tags applied on the network.

AvailabilityZoneHints []string

The availability zone candidates for the network.

DnsDomain string

The network DNS domain. Available, when Neutron DNS extension is enabled

Id string

The provider-assigned unique ID for this managed resource.

Region string

See Argument Reference above.

Shared string

Specifies whether the network resource can be accessed by any tenant or not.

Description string

See Argument Reference above.

External bool

See Argument Reference above.

MatchingSubnetCidr string
Mtu int

See Argument Reference above.

Name string

See Argument Reference above.

NetworkId string
Status string
Tags []string
TenantId string
TransparentVlan bool

See Argument Reference above.

adminStateUp string

The administrative state of the network.

allTags string[]

The set of string tags applied on the network.

availabilityZoneHints string[]

The availability zone candidates for the network.

dnsDomain string

The network DNS domain. Available, when Neutron DNS extension is enabled

id string

The provider-assigned unique ID for this managed resource.

region string

See Argument Reference above.

shared string

Specifies whether the network resource can be accessed by any tenant or not.

description string

See Argument Reference above.

external boolean

See Argument Reference above.

matchingSubnetCidr string
mtu number

See Argument Reference above.

name string

See Argument Reference above.

networkId string
status string
tags string[]
tenantId string
transparentVlan boolean

See Argument Reference above.

admin_state_up str

The administrative state of the network.

all_tags List[str]

The set of string tags applied on the network.

availability_zone_hints List[str]

The availability zone candidates for the network.

dns_domain str

The network DNS domain. Available, when Neutron DNS extension is enabled

id str

The provider-assigned unique ID for this managed resource.

region str

See Argument Reference above.

shared str

Specifies whether the network resource can be accessed by any tenant or not.

description str

See Argument Reference above.

external bool

See Argument Reference above.

matching_subnet_cidr str
mtu float

See Argument Reference above.

name str

See Argument Reference above.

network_id str
status str
tags List[str]
tenant_id str
transparent_vlan bool

See Argument Reference above.

Package Details

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