Skip to content

Commit

Permalink
fix: pre-release deployments can not pass the terraform validation (#266
Browse files Browse the repository at this point in the history
)

**Describe the pull request**

Version with dash like pre-released version `0.18-rc.1` cant pass the
validation of appVersion

**Checklist**

- [x] I have linked the relative issue to this pull request
- [x] I have made the modifications or added tests related to my PR
- [x] I have added/updated the documentation for my RP
- [x] I put my PR in Ready for Review only when all the checklist is
checked

**Breaking changes ?**
no

Signed-off-by: 42Atomys <[email protected]>
  • Loading branch information
42atomys committed Nov 23, 2022
1 parent 92ab355 commit 9af9af4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy/modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ variable "appVersion" {
description = "Version of the service"

validation {
condition = can(regex("^(latest|v?[0-9\\.]+)$", var.appVersion)) # disable v prefix for now
error_message = "The version must be numeric characters and periods only and start with a v. (or latest)"
condition = can(regex("^(latest|v?[0-9\\.]+(?:-rc\\.[0-9]+)?)$", var.appVersion)) # disable v prefix for now
error_message = "The version must be respect the semver 2.0.0 convention (or latest). Got: ${var.appVersion}"
}
}

Expand Down

0 comments on commit 9af9af4

Please sign in to comment.