terraform-provider-docker
terraform-provider-docker copied to clipboard
Support for Docker Cluster Volumes
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Support for all possible options in the docker cli command docker volume create allowing for Cluster Volumes to be created.
The current implementation only creates a volume on the node that terraform connects to, causing issues when the service and volume are on differant nodes.
The current workaround for this is to create each volume everytime it is needed in the docker_service resource.
New or Affected Resource(s)
- docker_volume
Potential Terraform Configuration
resource "docker_volume" "test" {
name = "test"
driver_opts = {
type = "nfs"
o = "addr=test.server,rw"
device = ":/mnt/Puddle/test"
}
scope = "multi"
sharing = "all"
# All other `docker volume create` options
}
References
- https://docs.docker.com/reference/cli/docker/volume/create/#options