Merge pull request #47 from captn3m0/docker-link-warning

deprecate and add warning about the link feature
This commit is contained in:
kt 2018-05-24 22:07:38 -07:00 committed by GitHub
commit 593272e037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View file

@ -284,11 +284,12 @@ func resourceDockerContainer() *schema.Resource {
},
"links": &schema.Schema{
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Deprecated: "The --link flag is a legacy feature of Docker. It may eventually be removed.",
},
"ip_address": &schema.Schema{

View file

@ -53,6 +53,12 @@ The following arguments are supported:
container.
* `links` - (Optional, set of strings) Set of links for link based
connectivity between containers that are running on the same host.
~> **Warning** The --link flag is a legacy feature of Docker. It may eventually
be removed. It exposes _all_ environment variables originating from Docker to
any linked containers. This could have serious security implications if sensitive
data is stored in them. See [the docker documentation][linkdoc] for more details.
* `hostname` - (Optional, string) Hostname of the container.
* `domainname` - (Optional, string) Domain name of the container.
* `restart` - (Optional, string) The restart policy for the container. Must be
@ -205,3 +211,6 @@ The following attributes are exported:
NetworkSettings.
* `bridge` - The network bridge of the container as read from its
NetworkSettings.
[linkdoc] https://docs.docker.com/network/links/