From 612415913188f407440dfe64824c92ee79342ca5 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 2 Jan 2016 12:20:55 +0100 Subject: [PATCH 1/2] Add support of custom networks in docker --- r/network.html.markdown | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 r/network.html.markdown diff --git a/r/network.html.markdown b/r/network.html.markdown new file mode 100644 index 00000000..77d4d02f --- /dev/null +++ b/r/network.html.markdown @@ -0,0 +1,49 @@ +--- +layout: "docker" +page_title: "Docker: docker_network" +sidebar_current: "docs-docker-resource-network" +description: |- + Manages a Docker Network. +--- + +# docker\_network + +Manages a Docker Network. This can be used alongside +[docker\_container](/docs/providers/docker/r/container.html) +to create virtual networks within the docker environment. + +## Example Usage + +``` +# Find the latest Ubuntu precise image. +resource "docker_network" "private_network" { + name = "my_network" +} + +# Access it somewhere else with ${docker_image.docker_network.name} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required, string) The name of the Docker network. +* `check_duplicate` - (Optional, boolean) Requests daemon to check for networks with same name. +* `driver` - (Optional, string) Name of the network driver to use. Defaults to `bridge` driver. +* `options` - (Optional, map of strings) Network specific options to be used by the drivers. +* `ipam_driver` - (Optional, string) Driver used by the custom IP scheme of the network. +* `ipam_config` - (Optional, block) Configuration of the custom IP scheme of the network. + +The `ipam_config` block supports: + +* `subnet` - (Optional, string) +* `ip_range` - (Optional, string) +* `gateway` - (Optional, string) +* `aux_address` - (Optional, map of string) + +## Attributes Reference + +The following attributes are exported in addition to the above configuration: + +* `id` (string) +* `scope` (string) From 61372c77661dc1b9744123117dc3a64fd3d26b06 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Mon, 4 Jan 2016 20:58:54 +0100 Subject: [PATCH 2/2] Add the networks entry --- r/container.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/r/container.html.markdown b/r/container.html.markdown index 920288eb..e8ae91c1 100644 --- a/r/container.html.markdown +++ b/r/container.html.markdown @@ -68,6 +68,7 @@ The following arguments are supported: Defaults to "json-file". * `log_opts` - (Optional) Key/value pairs to use as options for the logging driver. +* `networks` - (Optional, set of strings) Id of the networks in which the container is. ## Ports