Skip to content

Commit

Permalink
Merge pull request #15 from qinjin/fix-vpc-validation
Browse files Browse the repository at this point in the history
fix: vpc validation
  • Loading branch information
JamesWoolfenden committed May 24, 2021
2 parents 362b1ba + c78c156 commit 39691ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ variable "vpc_id" {
description = "The id for the vpc"
type = string
validation {
condition = length(var.vpc_id) > 12 && substr(var.vpc_id, 0, 4) == "vpc-"
error_message = "The AMI ids need to start with ami- and is at least 12 characters."
condition = length(var.vpc_id) >= 12 && substr(var.vpc_id, 0, 4) == "vpc-"
error_message = "The VPC ids need to start with vpc- and is at least 12 characters."
}
}

Expand Down

0 comments on commit 39691ba

Please sign in to comment.