# VM Lifecycle Defaults
#
# Concrete default values for all VM lifecycle schemas.

{
  VmPersistence = {
    mode = 'permanent,
    auto_start = false,
    restart_policy = 'always,
    max_retries = 5,
    ttl_hours = 24,
    auto_cleanup = true,
    force_cleanup = false,
    cleanup_grace_period = 60,
    created_at_unix = 0,
  },

  VmLifecyclePolicy = {
    on_host_reboot = 'start,
    on_host_shutdown = 'shutdown,
    on_memory_pressure = 'none,
    on_disk_full = 'none,
    enforce_memory_limit = true,
    enforce_cpu_limit = true,
    enforce_disk_limit = false,
  },

  VmCleanupSchedule = {
    vm_name = "",
    vm_id = "",
    mode = 'temporary,
    created_at = "1970-01-01T00:00:00Z",
    scheduled_cleanup_at = "1970-01-01T00:00:00Z",
    ttl_hours = 24,
    cleanup_status = 'pending,
    cleanup_attempts = 0,
  },

  VmRecoveryState = {
    vm_name = "",
    vm_id = "",
    state_before_shutdown = 'stopped,
    creation_timestamp = "1970-01-01T00:00:00Z",
    last_checkpoint = "1970-01-01T00:00:00Z",
    config_snapshot = {},
  },

  VmAutoStartConfig = {
    vm_name = "",
    enabled = true,
    start_order = 0,
    start_delay_seconds = 0,
    wait_for_ssh = true,
    ssh_timeout_seconds = 300,
    on_start_failure = 'retry,
    max_start_retries = 3,
    depends_on = [],
  },

  VmCleanupPolicy = {
    cleanup_enabled = true,
    check_interval_minutes = 60,
    cleanup_window_start = "02:00",
    cleanup_window_end = "06:00",
    cleanup_in_window_only = true,
    max_concurrent_cleanups = 3,
    cleanup_batch_size = 10,
    require_confirmation = false,
    dry_run_mode = false,
    skip_on_low_resources = true,
    log_cleanup_operations = true,
    alert_on_cleanup_failure = true,
    retention_days = 7,
  },

  VmStateSnapshot = {
    vm_name = "",
    snapshot_time = "1970-01-01T00:00:00Z",
    vm_state = 'stopped,
    cpu_usage_percent = 0,
    memory_usage_mb = 0,
    disk_usage_gb = 0,
    ip_addresses = [],
    mac_addresses = [],
    uptime_seconds = 0,
    restart_count = 0,
  },
}
