GetNetwork

Finds a specific docker network and returns information about it.

Example Usage

using Pulumi;
using Docker = Pulumi.Docker;

class MyStack : Stack
{
    public MyStack()
    {
        var main = Output.Create(Docker.GetNetwork.InvokeAsync(new Docker.GetNetworkArgs
        {
            Name = "main",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_docker as docker

main = docker.get_network(name="main")
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";

const main = pulumi.output(docker.getNetwork({
    name: "main",
}, { async: true }));

Using GetNetwork

function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function  get_network(id=None, name=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:

Id string

The id of the Docker network.

Name string

The name of the Docker network.

Id string

The id of the Docker network.

Name string

The name of the Docker network.

id string

The id of the Docker network.

name string

The name of the Docker network.

id str

The id of the Docker network.

name str

The name of the Docker network.

GetNetwork Result

The following output properties are available:

Driver string

(Optional, string) The driver of the Docker network. Possible values are bridge, host, overlay, macvlan. See [docker docs][networkdocs] for more details.

Internal bool
IpamConfigs List<GetNetworkIpamConfig>
Options Dictionary<string, object>

(Optional, map) Only available with bridge networks. See [docker docs][bridgeoptionsdocs] for more details. * internal (Optional, bool) Boolean flag for whether the network is internal. * ipam_config (Optional, map) See IPAM below for details. * scope (Optional, string) Scope of the network. One of swarm, global, or local.

Scope string
Id string
Name string
Driver string

(Optional, string) The driver of the Docker network. Possible values are bridge, host, overlay, macvlan. See [docker docs][networkdocs] for more details.

Internal bool
IpamConfigs []GetNetworkIpamConfig
Options map[string]interface{}

(Optional, map) Only available with bridge networks. See [docker docs][bridgeoptionsdocs] for more details. * internal (Optional, bool) Boolean flag for whether the network is internal. * ipam_config (Optional, map) See IPAM below for details. * scope (Optional, string) Scope of the network. One of swarm, global, or local.

Scope string
Id string
Name string
driver string

(Optional, string) The driver of the Docker network. Possible values are bridge, host, overlay, macvlan. See [docker docs][networkdocs] for more details.

internal boolean
ipamConfigs GetNetworkIpamConfig[]
options {[key: string]: any}

(Optional, map) Only available with bridge networks. See [docker docs][bridgeoptionsdocs] for more details. * internal (Optional, bool) Boolean flag for whether the network is internal. * ipam_config (Optional, map) See IPAM below for details. * scope (Optional, string) Scope of the network. One of swarm, global, or local.

scope string
id string
name string
driver str

(Optional, string) The driver of the Docker network. Possible values are bridge, host, overlay, macvlan. See [docker docs][networkdocs] for more details.

internal bool
ipam_configs List[GetNetworkIpamConfig]
options Dict[str, Any]

(Optional, map) Only available with bridge networks. See [docker docs][bridgeoptionsdocs] for more details. * internal (Optional, bool) Boolean flag for whether the network is internal. * ipam_config (Optional, map) See IPAM below for details. * scope (Optional, string) Scope of the network. One of swarm, global, or local.

scope str
id str
name str

Supporting Types

GetNetworkIpamConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AuxAddress Dictionary<string, object>
Gateway string
IpRange string
Subnet string
AuxAddress map[string]interface{}
Gateway string
IpRange string
Subnet string
auxAddress {[key: string]: any}
gateway string
ipRange string
subnet string
auxAddress Dict[str, Any]
gateway str
ipRange str
subnet str

Package Details

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