Started to add disks modules.
This commit is contained in:
@@ -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}"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
output "disks" {
|
||||
value = aws_ebs_volume.disks
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user