Skip to content

Commit dc0fbaa

Browse files
Update variables.tf
1 parent 28b2c72 commit dc0fbaa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,14 @@ variable "instance_type" {
122122
description = "The type of instance to start"
123123
type = string
124124
default = "t3.micro"
125+
126+
validation {
127+
condition = contains(["micro", "medium", "large", "nano"], var.instance_type)
128+
error_message = "Instance type must be one of: micro, medium, large, nano."
129+
}
125130
}
126131

132+
127133
variable "instance_tags" {
128134
description = "Additional tags for the instance"
129135
type = map(string)

0 commit comments

Comments
 (0)