Skip to content

Commit

Permalink
Update variable lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Stotler committed Nov 27, 2024
1 parent 5cce885 commit f8788ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.0.1
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### [1.0.1] (https://github.com/plus3it/terraform-aws-tardigrade-account-alternate-contacts/releases/tag/1.0.1)

**Released**: 2024.11.27

**Summary**:

* Adds variable validation

### [1.0.0] (https://github.com/plus3it/terraform-aws-tardigrade-account-alternate-contacts/releases/tag/1.0.0)

**Released**: 2023.02.09
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ variable "account_alternate_contacts" {
condition = alltrue([
for type in var.account_alternate_contacts :
length(type.email_address) >= 1 &&
length(type.email_address) <= 50 &&
length(type.email_address) <= 254 &&
can(regex("^[\\s]*[\\w+=.#|!&-]+@[\\w.-]+\\.[\\w]+[\\s]*$", type.email_address))
])
error_message = "Invalid value for email address (must be between 1 and 50 characters and correct syntax)"
Expand All @@ -48,7 +48,7 @@ variable "account_alternate_contacts" {
condition = alltrue([
for type in var.account_alternate_contacts :
length(type.phone_number) >= 1 &&
length(type.phone_number) <= 50 &&
length(type.phone_number) <= 25 &&
can(regex("^[\\s0-9()+-]+$", type.phone_number))
])
error_message = "Invalid value for phone number (must be between 1 and 50 characters and correct syntax)"
Expand Down

0 comments on commit f8788ff

Please sign in to comment.