Last active
May 29, 2020 15:29
-
-
Save karl-cardenas-coding/49bf8dec6f6190937b0afd98ac389fa6 to your computer and use it in GitHub Desktop.
Can function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "os" { | |
default = "linux" | |
validation { | |
# The condition here identifies if the variable contains the string "linxu" OR "windows". | |
condition = can(regex("linux|windows", var.os)) | |
error_message = "ERROR: Operating System must be Windows OR Linux." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment