From 9eeee51b90bb6b91d703bbbf41ef4f30e38c9550 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Thu, 28 Mar 2024 18:56:38 +0000 Subject: [PATCH] add instance_type --- variables.tf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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