Network
Manages a Docker Network. This can be used alongside docker_container to create virtual networks within the docker environment.
Example Usage
using Pulumi;
using Docker = Pulumi.Docker;
class MyStack : Stack
{
public MyStack()
{
// Create a new docker network
var privateNetwork = new Docker.Network("privateNetwork", new Docker.NetworkArgs
{
});
}
}
Coming soon!
import pulumi
import pulumi_docker as docker
# Create a new docker network
private_network = docker.Network("privateNetwork")import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
// Create a new docker network
const privateNetwork = new docker.Network("private_network", {});Create a Network Resource
new Network(name: string, args?: NetworkArgs, opts?: CustomResourceOptions);def Network(resource_name, opts=None, attachable=None, check_duplicate=None, driver=None, ingress=None, internal=None, ipam_configs=None, ipam_driver=None, ipv6=None, labels=None, name=None, options=None, __props__=None);func NewNetwork(ctx *Context, name string, args *NetworkArgs, opts ...ResourceOption) (*Network, error)public Network(string name, NetworkArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Network Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Network resource accepts the following input properties:
- Attachable bool
Enable manual container attachment to the network. Defaults to
false.- Check
Duplicate bool Requests daemon to check for networks with same name.
- Driver string
Name of the network driver to use. Defaults to
bridgedriver.- Ingress bool
Create swarm routing-mesh network. Defaults to
false.- Internal bool
Restrict external access to the network. Defaults to
false.- Ipam
Configs List<NetworkIpam Config Args> See IPAM config below for details.
- Ipam
Driver string Driver used by the custom IP scheme of the network.
- Ipv6 bool
Enable IPv6 networking. Defaults to
false.- Labels
List<Network
Label Args> See Labels below for details.
- Name string
The name of the Docker network.
- Options Dictionary<string, object>
Network specific options to be used by the drivers.
- Attachable bool
Enable manual container attachment to the network. Defaults to
false.- Check
Duplicate bool Requests daemon to check for networks with same name.
- Driver string
Name of the network driver to use. Defaults to
bridgedriver.- Ingress bool
Create swarm routing-mesh network. Defaults to
false.- Internal bool
Restrict external access to the network. Defaults to
false.- Ipam
Configs []NetworkIpam Config See IPAM config below for details.
- Ipam
Driver string Driver used by the custom IP scheme of the network.
- Ipv6 bool
Enable IPv6 networking. Defaults to
false.- Labels
[]Network
Label See Labels below for details.
- Name string
The name of the Docker network.
- Options map[string]interface{}
Network specific options to be used by the drivers.
- attachable boolean
Enable manual container attachment to the network. Defaults to
false.- check
Duplicate boolean Requests daemon to check for networks with same name.
- driver string
Name of the network driver to use. Defaults to
bridgedriver.- ingress boolean
Create swarm routing-mesh network. Defaults to
false.- internal boolean
Restrict external access to the network. Defaults to
false.- ipam
Configs NetworkIpam Config[] See IPAM config below for details.
- ipam
Driver string Driver used by the custom IP scheme of the network.
- ipv6 boolean
Enable IPv6 networking. Defaults to
false.- labels
Network
Label[] See Labels below for details.
- name string
The name of the Docker network.
- options {[key: string]: any}
Network specific options to be used by the drivers.
- attachable bool
Enable manual container attachment to the network. Defaults to
false.- check_
duplicate bool Requests daemon to check for networks with same name.
- driver str
Name of the network driver to use. Defaults to
bridgedriver.- ingress bool
Create swarm routing-mesh network. Defaults to
false.- internal bool
Restrict external access to the network. Defaults to
false.- ipam_
configs List[NetworkIpam Config] See IPAM config below for details.
- ipam_
driver str Driver used by the custom IP scheme of the network.
- ipv6 bool
Enable IPv6 networking. Defaults to
false.- labels
List[Network
Label] See Labels below for details.
- name str
The name of the Docker network.
- options Dict[str, Any]
Network specific options to be used by the drivers.
Outputs
All input properties are implicitly available as output properties. Additionally, the Network resource produces the following output properties:
Look up an Existing Network Resource
Get an existing Network resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NetworkState, opts?: CustomResourceOptions): Networkstatic get(resource_name, id, opts=None, attachable=None, check_duplicate=None, driver=None, ingress=None, internal=None, ipam_configs=None, ipam_driver=None, ipv6=None, labels=None, name=None, options=None, scope=None, __props__=None);func GetNetwork(ctx *Context, name string, id IDInput, state *NetworkState, opts ...ResourceOption) (*Network, error)public static Network Get(string name, Input<string> id, NetworkState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Attachable bool
Enable manual container attachment to the network. Defaults to
false.- Check
Duplicate bool Requests daemon to check for networks with same name.
- Driver string
Name of the network driver to use. Defaults to
bridgedriver.- Ingress bool
Create swarm routing-mesh network. Defaults to
false.- Internal bool
Restrict external access to the network. Defaults to
false.- Ipam
Configs List<NetworkIpam Config Args> See IPAM config below for details.
- Ipam
Driver string Driver used by the custom IP scheme of the network.
- Ipv6 bool
Enable IPv6 networking. Defaults to
false.- Labels
List<Network
Label Args> See Labels below for details.
- Name string
The name of the Docker network.
- Options Dictionary<string, object>
Network specific options to be used by the drivers.
- Scope string
- Attachable bool
Enable manual container attachment to the network. Defaults to
false.- Check
Duplicate bool Requests daemon to check for networks with same name.
- Driver string
Name of the network driver to use. Defaults to
bridgedriver.- Ingress bool
Create swarm routing-mesh network. Defaults to
false.- Internal bool
Restrict external access to the network. Defaults to
false.- Ipam
Configs []NetworkIpam Config See IPAM config below for details.
- Ipam
Driver string Driver used by the custom IP scheme of the network.
- Ipv6 bool
Enable IPv6 networking. Defaults to
false.- Labels
[]Network
Label See Labels below for details.
- Name string
The name of the Docker network.
- Options map[string]interface{}
Network specific options to be used by the drivers.
- Scope string
- attachable boolean
Enable manual container attachment to the network. Defaults to
false.- check
Duplicate boolean Requests daemon to check for networks with same name.
- driver string
Name of the network driver to use. Defaults to
bridgedriver.- ingress boolean
Create swarm routing-mesh network. Defaults to
false.- internal boolean
Restrict external access to the network. Defaults to
false.- ipam
Configs NetworkIpam Config[] See IPAM config below for details.
- ipam
Driver string Driver used by the custom IP scheme of the network.
- ipv6 boolean
Enable IPv6 networking. Defaults to
false.- labels
Network
Label[] See Labels below for details.
- name string
The name of the Docker network.
- options {[key: string]: any}
Network specific options to be used by the drivers.
- scope string
- attachable bool
Enable manual container attachment to the network. Defaults to
false.- check_
duplicate bool Requests daemon to check for networks with same name.
- driver str
Name of the network driver to use. Defaults to
bridgedriver.- ingress bool
Create swarm routing-mesh network. Defaults to
false.- internal bool
Restrict external access to the network. Defaults to
false.- ipam_
configs List[NetworkIpam Config] See IPAM config below for details.
- ipam_
driver str Driver used by the custom IP scheme of the network.
- ipv6 bool
Enable IPv6 networking. Defaults to
false.- labels
List[Network
Label] See Labels below for details.
- name str
The name of the Docker network.
- options Dict[str, Any]
Network specific options to be used by the drivers.
- scope str
Supporting Types
NetworkIpamConfig
NetworkLabel
Package Details
- Repository
- https://github.com/pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dockerTerraform Provider.