mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-02-11 06:43:45 -05:00
2.4 KiB
2.4 KiB
| page_title | subcategory | description |
|---|---|---|
| docker_network Resource - terraform-provider-docker | docker_network provides details about a specific Docker Network. |
docker_network (Resource)
docker_network provides details about a specific Docker Network.
Example Usage
resource "docker_network" "private_network" {
name = "my_network"
}
Schema
Required
- name (String) The name of the Docker network.
Optional
- attachable (Boolean) Enable manual container attachment to the network.
- check_duplicate (Boolean) Requests daemon to check for networks with same name.
- driver (String) The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - id (String) The ID of this resource.
- ingress (Boolean) Create swarm routing-mesh network.Defaults to
false. - internal (Boolean) Whether the network is internal.
- ipam_config (Block Set) The IPAM configuration options (see below for nested schema)
- ipam_driver (String) Driver used by the custom IP scheme of the network.
- ipv6 (Boolean) Enable IPv6 networking. Defaults to
false. - labels (Block Set) User-defined key/value metadata (see below for nested schema)
- options (Map of String) Only available with bridge networks. See bridge options docs for more details.
Read-Only
- scope (String) Scope of the network. One of
swarm,global, orlocal.
Nested Schema for ipam_config
Optional:
- aux_address (Map of String) Auxiliary IPv4 or IPv6 addresses used by Network driver
- gateway (String) The IP address of the gateway
- ip_range (String) The ip range in CIDR form
- subnet (String) The subnet in CIDR form
Nested Schema for labels
Required:
- label (String) Name of the label
- value (String) Value of the label
Import
Import is supported using the following syntax:
#!/bin/bash
terraform import docker_network.foo "$(docker network inspect -f {{.ID}} p73)"