diff --git a/README.md b/README.md index d3cf4df..e7fb385 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ AWS Codecommit: ```hcl module "pipeline" { source = "aws-samples/pipeline/aws" - version = "2.2.x" + version = "2.3.x" pipeline_name = "pipeline-name" repo = "codecommit-repo-name" } @@ -70,7 +70,7 @@ module "pipeline" { codebuild_policy = aws_iam_policy.this.arn build_timeout = 10 - terraform_version = "1.7.0" + terraform_version = "1.8.0" checkov_version = "3.2.0" tflint_version = "0.55.0" diff --git a/variables.tf b/variables.tf index 8aa4a96..3c44bcc 100644 --- a/variables.tf +++ b/variables.tf @@ -56,6 +56,10 @@ variable "checkov_skip" { variable "checkov_version" { type = string default = "3.2.0" + validation { + condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.checkov_version)) + error_message = "checkov version must use format x.y.z" + } } variable "codebuild_policy" { @@ -121,16 +125,28 @@ variable "tags" { variable "tagnag_version" { type = string default = "0.7.9" + validation { + condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.tagnag_version)) + error_message = "tagnag version must use format x.y.z" + } } variable "terraform_version" { type = string - default = "1.7.0" + default = "1.8.0" + validation { + condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.terraform_version)) + error_message = "terraform version must use format x.y.z" + } } variable "tflint_version" { type = string default = "0.55.0" + validation { + condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.tflint_version)) + error_message = "tflint version must use format x.y.z" + } } variable "vpc" {