aboutsummaryrefslogtreecommitdiff
path: root/vps.tf
diff options
context:
space:
mode:
Diffstat (limited to 'vps.tf')
-rw-r--r--vps.tf13
1 files changed, 13 insertions, 0 deletions
diff --git a/vps.tf b/vps.tf
index e278cc1..55a640e 100644
--- a/vps.tf
+++ b/vps.tf
@@ -42,3 +42,16 @@ resource "digitalocean_floating_ip_assignment" "vps" {
ip_address = "${var.floating_ip}"
droplet_id = "${digitalocean_droplet.vps.id}"
}
+
+resource "digitalocean_volume" "vps_persistent_volume" {
+ region = "nyc3"
+ name = "vps-persistent-volume"
+ size = 10
+ initial_filesystem_type = "ext4"
+ description = "Persistent disk to store docker volumes contents across droplets being created and destroyed"
+}
+
+resource "digitalocean_volume_attachment" "foobar" {
+ volume_id = "${digitalocean_volume.vps_persistent_volume.id}"
+ droplet_id = "${digitalocean_droplet.vps.id}"
+}