Manages a Docker Network. This can be used alongside docker_container to create virtual networks within the docker environment.
# Create a new docker network resource "docker_network" "private_network" { name = "my_network" } # Access it somewhere else with ${docker_network.private_network.name}
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. internal
- (Optional, boolean) Restrict external access to the network. Defaults to false
. ipam_driver
- (Optional, string) Driver used by the custom IP scheme of the network. ipam_config
- (Optional, block) See IPAM config below for details. 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) The following attributes are exported in addition to the above configuration:
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/docker/r/network.html