dokploy_mount (Data Source)
Looks up a volume, bind or file mount of a service that already exists in Dokploy:
data "dokploy_mount" "data" {
service_id = data.dokploy_application.web.id
service_type = "application"
mount_path = "/data"
}~> Dokploy does not enforce uniqueness for this record. If two mount records match the lookup attributes, this data source fails instead of a guess. Look the record up by id in that case.
Example Usage
data "dokploy_mount" "example" {
id = "your-mount-id"
}
# Look a mount up by the service and the path in the container.
data "dokploy_mount" "data" {
service_id = data.dokploy_application.web.id
service_type = "application"
mount_path = "/data"
}Schema
Optional
host_path(String) Path on the host of a bind mount. A lookup can use it as a filter.id(String) Mount id. Set it for a lookup by id, or leave it unset and setservice_idwith the distinguishing attributes.mount_path(String) Path inside the container. A lookup can use it as a filter.service_id(String) Id of the service that owns the mount. Set it withservice_typeandmount_pathorhost_path.service_type(String) Type of the service:application,compose,postgres,mysql,mariadb,mongo,redisorlibsql.
Read-Only
content(String) Content of a file mount, or null.file_path(String) Path of a file mount, or null.type(String) Mount type:bind,volumeorfile.volume_name(String) Volume name of a volume mount, or null.