mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
TF: Check if input variables are defined
This commit is contained in:
parent
aec0761580
commit
0c7d0d0eaa
1 changed files with 15 additions and 0 deletions
|
@ -6,6 +6,11 @@ variable "timezone" {
|
||||||
variable "linux_password" {
|
variable "linux_password" {
|
||||||
#default = "LiNuXuSeRPaSs#"
|
#default = "LiNuXuSeRPaSs#"
|
||||||
description = "Set a password for the default user"
|
description = "Set a password for the default user"
|
||||||
|
|
||||||
|
validation {
|
||||||
|
condition = length(var.linux_password) > 0
|
||||||
|
error_message = "Please specify a password for the default user."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cloud resources name configuration
|
# Cloud resources name configuration
|
||||||
|
@ -47,6 +52,11 @@ variable "flavor" {
|
||||||
variable "key_pair" {
|
variable "key_pair" {
|
||||||
#default = ""
|
#default = ""
|
||||||
description = "Specify your SSH key pair"
|
description = "Specify your SSH key pair"
|
||||||
|
|
||||||
|
validation {
|
||||||
|
condition = length(var.key_pair) > 0
|
||||||
|
error_message = "Please specify a Key Pair."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "volume_size" {
|
variable "volume_size" {
|
||||||
|
@ -68,4 +78,9 @@ variable "web_user" {
|
||||||
variable "web_password" {
|
variable "web_password" {
|
||||||
#default = "w3b$ecret"
|
#default = "w3b$ecret"
|
||||||
description = "Set a password for the web user"
|
description = "Set a password for the web user"
|
||||||
|
|
||||||
|
validation {
|
||||||
|
condition = length(var.web_password) > 0
|
||||||
|
error_message = "Please specify a password for the web user."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue