Add volume creation without attachment
This commit is contained in:
parent
47a869da68
commit
6249fafed2
8
resource.digitalocean_volume.this.tf
Normal file
8
resource.digitalocean_volume.this.tf
Normal 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
|
||||||
|
}
|
4
variable.volume_size.tf
Normal file
4
variable.volume_size.tf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
variable "volume_size" {
|
||||||
|
default = "0"
|
||||||
|
type = number
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user