Add volume creation without attachment

This commit is contained in:
2020-08-09 15:22:07 -05:00
parent 47a869da68
commit 6249fafed2
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
resource "digitalocean_volume" "this" {
count = var.volume_size == 0 ? 1 : 0
description = "Data Volume for ${var.host_name}.${var.domain_name}"
initial_filesystem_type = "ext4"
name = "${var.host_name}.${var.domain_name}"
region = var.region
size = var.volume_size
}