Skip to content

Commit

Permalink
Provider resolution (#36)
Browse files Browse the repository at this point in the history
fixed variable regex validation on tags (missing ':')
fixed variable regex validation on instance types (missing instance type
options like t4g or m7i)
removed 3rd octet from required version which was preventing the ~>
operator from functioning
  • Loading branch information
morga471 committed Feb 25, 2025
1 parent 53389b0 commit 7ab18d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ efs-csi-controller 0 5m
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.14.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.14 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.84.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.88.0 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion requirements.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.14.0"
version = "~> 5.14"
}
}
}
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ variable "eks_instance_types" {
error_message = "At least one instance type must be specified."
}
validation {
condition = alltrue([for t in var.eks_instance_types : can(regex("^[a-z][1-9][.][a-z0-9]+$", t))])
condition = alltrue([for t in var.eks_instance_types : can(regex("^[a-z][1-9][a-z]?[.][a-zA-Z0-9]+$", t))])
error_message = "Instance types must be valid EC2 instance type formats (e.g., t3.large, m5.xlarge)."
}
}
Expand Down Expand Up @@ -145,7 +145,7 @@ variable "tags" {
error_message = "Maximum number of tags allowed is 45."
}
validation {
condition = alltrue([for k, v in var.tags : length(k) <= 128 && length(v) <= 256 && can(regex("^[\\w\\s+=.@-]*$", k)) && can(regex("^[\\w\\s+=.@-]*$", v))])
error_message = "Tag keys must be <= 128 chars, values <= 256 chars, and both can only contain alphanumeric characters, spaces, and '.+-=@_'."
condition = alltrue([for k, v in var.tags : length(k) <= 128 && length(v) <= 256 && can(regex("^[\\w\\s+=.@:-]*$", k)) && can(regex("^[\\w\\s+=.@:-]*$", v))])
error_message = "Tag keys must be <= 128 chars, values <= 256 chars, and both can only contain alphanumeric characters, spaces, and '.+-=@:_'."
}
}

0 comments on commit 7ab18d5

Please sign in to comment.