Skip to content

Commit

Permalink
fix validations
Browse files Browse the repository at this point in the history
  • Loading branch information
naftulikay committed Apr 22, 2024
1 parent add2cc9 commit 7cc15ef
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 @@ -46,12 +46,12 @@ variable url {
EOF

validation {
condition = length(regex('^(?:https[:][/]{2})?(?:[^:/]+)([/].*)$', var.url)) > 0
condition = length(regex("^(?:https[:][/]{2})?(?:[^:/]+)([/].*)$", var.url)) > 0
error_message = "var.uri should not end with or contain a trailing slash/HTTP path"
}

validation {
condition = !startswith('https://', var.url)
condition = startswith("https://", var.url) == false
error_message = "var.uri should start with 'https://'"

}
Expand Down

0 comments on commit 7cc15ef

Please sign in to comment.