Started to add disks modules.

This commit is contained in:
Curtis Wilson
2022-01-28 10:57:09 -05:00
parent d610a72022
commit b9ed4a37d5
8 changed files with 110 additions and 3 deletions
+10
View File
@@ -0,0 +1,10 @@
resource "aws_ebs_volume" "disks" {
availability_zone = var.availability_zone
size = var.size
count = var.num
encrypted = true
tags = {
Name = "${var.prefix}-${count.index}"
}
}
+3
View File
@@ -0,0 +1,3 @@
output "disks" {
value = aws_ebs_volume.disks
}
+19
View File
@@ -0,0 +1,19 @@
variable "availability_zone" {
description = "The availability zone this disk will reside in. This AZ is applied to all 'num' disks."
type = string
}
variable "num" {
description = "The number of disks to be created with this config."
type = number
}
variable "prefix" {
description = "This prefix will be used in the name of each disk created with this module. If the prefix is 'zfs', then it will create disks with names, zfs-0 and zfs-1."
type = string
}
variable "size" {
description = "The size of the disk in GB."
type = number
}