Skip to content

Commit

Permalink
Add validation for version labels of secrets-manager-secret module (#7
Browse files Browse the repository at this point in the history
)
  • Loading branch information
posquit0 authored Apr 11, 2022
1 parent 3d8132e commit ff61683
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/secrets-manager-secret/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ variable "versions" {
alltrue([
for version in var.versions :
length(version.labels) > 0
]),
alltrue([
for version in var.versions :
alltrue([
for label in version.labels :
!contains(["AWSCURRENT", "AWSPENDING", "AWSPREVIOUS"], label)
])
])
])
error_message = "Not valid parameters for `versions`."
Expand Down

0 comments on commit ff61683

Please sign in to comment.