From 5ef7e4283433d4e2a79f4be35d4c6bdd8367b1f5 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sun, 31 Jan 2016 08:23:35 +1100 Subject: [PATCH] provider/docker: Update documentation - Use a consistent format - Remove typos - Specify the expected parameter type for each entry - Change importance of block documentation --- .../docker/r/container.html.markdown | 27 ++++++++++--------- .../providers/docker/r/image.html.markdown | 6 ++--- .../providers/docker/r/network.html.markdown | 21 ++++++++++----- .../providers/docker/r/volume.html.markdown | 3 ++- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/website/source/docs/providers/docker/r/container.html.markdown b/website/source/docs/providers/docker/r/container.html.markdown index b417d741f..a60b06bf7 100644 --- a/website/source/docs/providers/docker/r/container.html.markdown +++ b/website/source/docs/providers/docker/r/container.html.markdown @@ -44,7 +44,8 @@ The following arguments are supported: `["/usr/bin/myprogram"]`. * `dns` - (Optional, set of strings) Set of DNS servers. * `env` - (Optional, set of strings) Environmental variables to set. -* `labels` - (Optional) Key/value pairs to set as labels on the container. +* `labels` - (Optional, map of strings) Key/value pairs to set as labels on the + container. * `links` - (Optional, set of strings) Set of links for link based connectivity between containers that are running on the same host. * `hostname` - (Optional, string) Hostname of the container. @@ -56,24 +57,26 @@ The following arguments are supported: * `must_run` - (Optional, bool) If true, then the Docker container will be kept running. If false, then as long as the container exists, Terraform assumes it is successful. -* `ports` - (Optional) See [Ports](#ports) below for details. -* `host_entry` - (Optional) See [Extra Hosts](#extra_hosts) below for details. +* `ports` - (Optional, block) See [Ports](#ports) below for details. +* `host_entry` - (Optional, block) See [Extra Hosts](#extra_hosts) below for + details. * `privileged` - (Optional, bool) Run container in privileged mode. * `publish_all_ports` - (Optional, bool) Publish all ports of the container. -* `volumes` - (Optional) See [Volumes](#volumes) below for details. +* `volumes` - (Optional, block) See [Volumes](#volumes) below for details. * `memory` - (Optional, int) The memory limit for the container in MBs. * `memory_swap` - (Optional, int) The total memory limit (memory + swap) for the container in MBs. * `cpu_shares` - (Optional, int) CPU shares (relative weight) for the container. * `log_driver` - (Optional, string) The logging driver to use for the container. Defaults to "json-file". -* `log_opts` - (Optional) Key/value pairs to use as options for the logging - driver. -* `network_mode` - (Optional) Network mode of the container. -* `networks` - (Optional, set of strings) Id of the networks in which the container is. +* `log_opts` - (Optional, map of strings) Key/value pairs to use as options for + the logging driver. +* `network_mode` - (Optional, string) Network mode of the container. +* `networks` - (Optional, set of strings) Id of the networks in which the + container is. -## Ports +### Ports `ports` is a block within the configuration that can be repeated to specify the port mappings of the container. Each `ports` block supports @@ -86,7 +89,7 @@ the following: defaults to TCP. -## Extra Hosts +### Extra Hosts `host_entry` is a block within the configuration that can be repeated to specify the extra host mappings for the container. Each `host_entry` block supports @@ -99,7 +102,7 @@ This is equivalent to using the `--add-host` option when using the `run` command of the Docker CLI. -## Volumes +### Volumes `volumes` is a block within the configuration that can be repeated to specify the volumes attached to a container. Each `volumes` block supports @@ -115,7 +118,7 @@ the following: volume will be mounted. * `read_only` - (Optional, bool) If true, this volume will be readonly. Defaults to false. - + One of `from_container`, `host_path` or `volume_name` must be set. ## Attributes Reference diff --git a/website/source/docs/providers/docker/r/image.html.markdown b/website/source/docs/providers/docker/r/image.html.markdown index f859ef1a9..584f373af 100644 --- a/website/source/docs/providers/docker/r/image.html.markdown +++ b/website/source/docs/providers/docker/r/image.html.markdown @@ -28,9 +28,9 @@ resource "docker_image" "ubuntu" { The following arguments are supported: -* `name` - (Required) The name of the Docker image, including any tags. -* `keep_updated` - (Optional) If true, then the Docker image will always - be updated on the host to the latest. If this is false, as long as an +* `name` - (Required, string) The name of the Docker image, including any tags. +* `keep_updated` - (Optional, boolean) If true, then the Docker image will + always be updated on the host to the latest. If this is false, as long as an image is downloaded with the correct tag, it won't be redownloaded if there is a newer image. diff --git a/website/source/docs/providers/docker/r/network.html.markdown b/website/source/docs/providers/docker/r/network.html.markdown index 77d4d02f1..72fe7e859 100644 --- a/website/source/docs/providers/docker/r/network.html.markdown +++ b/website/source/docs/providers/docker/r/network.html.markdown @@ -20,7 +20,7 @@ resource "docker_network" "private_network" { name = "my_network" } -# Access it somewhere else with ${docker_image.docker_network.name} +# Access it somewhere else with ${docker_network.private_network.name} ``` ## Argument Reference @@ -28,11 +28,20 @@ resource "docker_network" "private_network" { 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. +* `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) See [IPAM config](#ipam_config) below for + details. + + +### IPAM config +Configuration of the custom IP scheme of the network. The `ipam_config` block supports: diff --git a/website/source/docs/providers/docker/r/volume.html.markdown b/website/source/docs/providers/docker/r/volume.html.markdown index 5b13efc02..f19d40191 100644 --- a/website/source/docs/providers/docker/r/volume.html.markdown +++ b/website/source/docs/providers/docker/r/volume.html.markdown @@ -27,7 +27,8 @@ resource "docker_volume" "shared_volume" { The following arguments are supported: -* `name` - (Optional, string) The name of the Docker volume (generated if not provided). +* `name` - (Optional, string) The name of the Docker volume (generated if not + provided). * `driver` - (Optional, string) Driver type for the volume (defaults to local). * `driver_opts` - (Optional, map of strings) Options specific to the driver.