diff --git a/compute.tf b/compute.tf index 6fcbb4d..3760627 100644 --- a/compute.tf +++ b/compute.tf @@ -14,7 +14,7 @@ resource "aws_instance" "ec2-instance" { iam_instance_profile = var.iam_instance_profile root_block_device { - volume_type = "gp2" + volume_type = var.storage_class volume_size = var.server_volume_size delete_on_termination = var.delete_volume_on_instance_termination } diff --git a/variables.tf b/variables.tf index 3b9361d..33d3593 100644 --- a/variables.tf +++ b/variables.tf @@ -3,6 +3,11 @@ variable "region" { default = "eu-west-1" # Ireland } +variable "storage_class" { + description = "Storage class" + default = "gp2" +} + variable "env" { description = "The deployment environment this instance belongs to. Possible values: stage, preview, production" default = "stage"