diff --git a/variables.tf b/variables.tf index 8f82166..3a78330 100644 --- a/variables.tf +++ b/variables.tf @@ -41,3 +41,21 @@ variable "ingress_cidr" { default = "172.59.221.135/32" } +variable "instance_type" { + description = "Instance Type" + default = "t2.micro" + validation { + condition = ( + var.instance_type == "t2.micro" || + var.instance_type == "t3.medium" || + var.instance_type == "m5.large" || + var.instance_type == "c5.large" || + var.instance_type == "c5a.large" || + var.instance_type == "m5.2xlarge" || + var.instance_type == "c5.2xlarge" || + var.instance_type == "m5.4xlarge" || + var.instance_type == "c5.4xlarge" + ) + error_message = "Instance_type must be set to a valid vm instance type." + } +} \ No newline at end of file