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
LookupNetworkin 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.
- Matching
Subnet stringCidr The CIDR of a subnet within the network.
- Mtu int
The network MTU to filter. Available, when Neutron
net-mtuextension is enabled.- Name string
The name of the network.
- Network
Id 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
regionargument of the provider is used.- Status string
The status of the network.
- List<string>
The list of network tags to filter.
- Tenant
Id string The owner of the network.
- Transparent
Vlan 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.
- Matching
Subnet stringCidr The CIDR of a subnet within the network.
- Mtu int
The network MTU to filter. Available, when Neutron
net-mtuextension is enabled.- Name string
The name of the network.
- Network
Id 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
regionargument of the provider is used.- Status string
The status of the network.
- []string
The list of network tags to filter.
- Tenant
Id string The owner of the network.
- Transparent
Vlan 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.
- matching
Subnet stringCidr The CIDR of a subnet within the network.
- mtu number
The network MTU to filter. Available, when Neutron
net-mtuextension is enabled.- name string
The name of the network.
- network
Id 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
regionargument of the provider is used.- status string
The status of the network.
- string[]
The list of network tags to filter.
- tenant
Id string The owner of the network.
- transparent
Vlan 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_ strcidr The CIDR of a subnet within the network.
- mtu float
The network MTU to filter. Available, when Neutron
net-mtuextension 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
regionargument of the provider is used.- status str
The status of the network.
- 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:
- Admin
State stringUp The administrative state of the network.
- List<string>
The set of string tags applied on the network.
- Availability
Zone List<string>Hints The availability zone candidates for the network.
- Dns
Domain 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.
- 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.
- Matching
Subnet stringCidr - Mtu int
See Argument Reference above.
- Name string
See Argument Reference above.
- Network
Id string - Status string
- List<string>
- Tenant
Id string - Transparent
Vlan bool See Argument Reference above.
- Admin
State stringUp The administrative state of the network.
- []string
The set of string tags applied on the network.
- Availability
Zone []stringHints The availability zone candidates for the network.
- Dns
Domain 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.
- 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.
- Matching
Subnet stringCidr - Mtu int
See Argument Reference above.
- Name string
See Argument Reference above.
- Network
Id string - Status string
- []string
- Tenant
Id string - Transparent
Vlan bool See Argument Reference above.
- admin
State stringUp The administrative state of the network.
- string[]
The set of string tags applied on the network.
- availability
Zone string[]Hints The availability zone candidates for the network.
- dns
Domain 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.
- 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.
- matching
Subnet stringCidr - mtu number
See Argument Reference above.
- name string
See Argument Reference above.
- network
Id string - status string
- string[]
- tenant
Id string - transparent
Vlan boolean See Argument Reference above.
- admin_
state_ strup The administrative state of the network.
- List[str]
The set of string tags applied on the network.
- availability_
zone_ List[str]hints 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.
- 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_ strcidr - mtu float
See Argument Reference above.
- name str
See Argument Reference above.
- network_
id str - status str
- 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
openstackTerraform Provider.