31 lines
881 B
HCL
Executable File

variable "environment" {
type = string
description = "Environment name (e.g., dev, staging, prod, test)"
validation {
condition = can(regex("^[a-zA-Z0-9-_]+$", var.environment))
error_message = "Environment must contain only alphanumeric characters, hyphens, and underscores."
}
}
variable "short_hostname" {
type = string
description = "Short hostname for the target server"
validation {
condition = can(regex("^[a-zA-Z0-9-]+$", var.short_hostname))
error_message = "Hostname must contain only alphanumeric characters and hyphens."
}
}
variable "vault_address" {
type = string
description = "Vault server address (e.g., https://vault.example.com:8200)"
validation {
condition = can(regex("^https?://", var.vault_address))
error_message = "Vault address must be a valid HTTP or HTTPS URL."
}
}