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."
  }
}

variable "role_id" {
  type        = string
  description = "Vault AppRole role_id for authentication"
  sensitive   = true
}

variable "secret_id" {
  type        = string
  description = "Vault AppRole secret_id for authentication"
  sensitive   = true
}

