# {{ project_name }} - Terraform Variables
# Generated by typedialog-prov-gen

variable "environment" {
  description = "Deployment environment (development, staging, production)"
  type        = string
  default     = "development"

  validation {
    condition     = contains(["development", "staging", "production"], var.environment)
    error_message = "Environment must be development, staging, or production."
  }
}

variable "region" {
  description = "Cloud provider region"
  type        = string
  default     = "{{ infrastructure.default_region | default(value="us-west-2") }}"
}

variable "zone" {
  description = "Cloud provider availability zone"
  type        = string
  default     = "${var.region}-a"
}

{% if infrastructure.database %}
variable "database_size" {
  description = "Database instance size"
  type        = string
  default     = "{{ infrastructure.database.size | default(value="db-small") }}"
}

variable "database_backup_enabled" {
  description = "Enable automated database backups"
  type        = bool
  default     = true
}
{% endif %}

{% if infrastructure.monitoring contains "prometheus" %}
variable "monitoring_machine_type" {
  description = "Monitoring instance machine type"
  type        = string
  default     = "{{ infrastructure.monitoring_machine_type | default(value="e2-small") }}"
}

variable "monitoring_image" {
  description = "Monitoring instance OS image"
  type        = string
  default     = "ubuntu-2204-lts"
}
{% endif %}

variable "ssh_keys" {
  description = "SSH public keys for instance access"
  type        = list(string)
  default     = []
}

variable "network_cidr" {
  description = "Network CIDR block"
  type        = string
  default     = "10.0.0.0/16"
}

variable "allowed_ips" {
  description = "IP addresses allowed to access infrastructure"
  type        = list(string)
  default     = ["0.0.0.0/0"]  # WARNING: Restrict in production
}

variable "tags" {
  description = "Additional tags for resources"
  type        = map(string)
  default     = {}
}
