mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-29 02:59:59 -05:00
provider/docker: Add docker_volume resource
This commit is contained in:
parent
9806e6ea9a
commit
5f2147a9d5
1 changed files with 38 additions and 0 deletions
38
r/volume.html.markdown
Normal file
38
r/volume.html.markdown
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
layout: "docker"
|
||||
page_title: "Docker: docker_volume"
|
||||
sidebar_current: "docs-docker-resource-volume"
|
||||
description: |-
|
||||
Creates and destroys docker volumes.
|
||||
---
|
||||
|
||||
# docker\_volume
|
||||
|
||||
Creates and destroys a volume in Docker. This can be used alongside
|
||||
[docker\_container](/docs/providers/docker/r/container.html)
|
||||
to prepare volumes that can be shared across containers.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
# Creates a docker volume "shared_volume".
|
||||
resource "docker_volume" "shared_volume" {
|
||||
name = "shared_volume"
|
||||
}
|
||||
|
||||
# Reference the volume with ${docker_volume.shared_volume.name}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
* `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.
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
The following attributes are exported in addition to the above configuration:
|
||||
|
||||
* `mountpoint` (string) - The mountpoint of the volume.
|
||||
Loading…
Reference in a new issue