Skip to content

Commit

Permalink
add: instance_type var must be free-tier type in asg modules
Browse files Browse the repository at this point in the history
  • Loading branch information
tkdn committed Mar 9, 2024
1 parent 305386e commit 3bffed6
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ variable "ami" {

variable "instance_type" {
type = string

validation {
condition = contains(["t2.micro", "t3.micro"], var.instance_type)
error_message = "Only free tier is allowed: t2.micro | t3.micro."
}
}

variable "min_size" {
type = number

validation {
condition = 0 < var.min_size && var.min_size <= 10
error_message = "ASG can't be empty and must have 10 or fewer instances"
}
}

variable "max_size" {
Expand Down

0 comments on commit 3bffed6

Please sign in to comment.