name = "azure_provider_fragment"

[[elements]]
border_bottom = true
border_top = true
name = "azure_header"
title = "☁️  Microsoft Azure Configuration"
type = "section_header"

[[elements]]
help = "Your Azure subscription ID (GUID format)"
name = "azure_subscription_id"
nickel_path = ["provider", "azure_subscription_id"]
prompt = "Azure Subscription ID"
required = true
type = "text"

[[elements]]
help = "Your Azure Active Directory tenant ID"
name = "azure_tenant_id"
nickel_path = ["provider", "azure_tenant_id"]
prompt = "Azure Tenant ID"
required = true
type = "text"

[[elements]]
help = "Client ID of the service principal (app registration)"
name = "azure_client_id"
nickel_path = ["provider", "azure_client_id"]
prompt = "Service Principal Client ID"
required = true
type = "text"

[[elements]]
help = "Client secret for authentication (will be masked)"
name = "azure_client_secret"
nickel_path = ["provider", "azure_client_secret"]
prompt = "Service Principal Client Secret"
required = true
type = "password"

[[elements]]
default = "westeurope"
help = "Azure region where resources will be deployed"
name = "azure_location"
nickel_path = ["provider", "azure_location"]
options = [
  { value = "eastus", label = "East US - Virginia, USA" },
  { value = "eastus2", label = "East US 2 - Virginia, USA" },
  { value = "westus", label = "West US - California, USA" },
  { value = "westus2", label = "West US 2 - Washington, USA" },
  { value = "westus3", label = "West US 3 - Arizona, USA" },
  { value = "centralus", label = "Central US - Iowa, USA" },
  { value = "northcentralus", label = "North Central US - Illinois, USA" },
  { value = "southcentralus", label = "South Central US - Texas, USA" },
  { value = "northeurope", label = "North Europe - Ireland" },
  { value = "westeurope", label = "West Europe - Netherlands" },
  { value = "francecentral", label = "France Central - Paris" },
  { value = "germanywestcentral", label = "Germany West Central - Frankfurt" },
  { value = "switzerlandnorth", label = "Switzerland North - Zurich" },
  { value = "uksouth", label = "UK South - London" },
  { value = "ukwest", label = "UK West - Cardiff" },
  { value = "norwayeast", label = "Norway East - Oslo" },
  { value = "swedencentral", label = "Sweden Central - Gävle" },
  { value = "eastasia", label = "East Asia - Hong Kong" },
  { value = "southeastasia", label = "Southeast Asia - Singapore" },
  { value = "japaneast", label = "Japan East - Tokyo" },
  { value = "japanwest", label = "Japan West - Osaka" },
  { value = "koreacentral", label = "Korea Central - Seoul" },
  { value = "australiaeast", label = "Australia East - Sydney" },
  { value = "australiasoutheast", label = "Australia Southeast - Melbourne" },
  { value = "canadacentral", label = "Canada Central - Toronto" },
  { value = "canadaeast", label = "Canada East - Quebec" },
  { value = "brazilsouth", label = "Brazil South - São Paulo" },
  { value = "southafricanorth", label = "South Africa North - Johannesburg" },
  { value = "uaenorth", label = "UAE North - Dubai" },
  { value = "centralindia", label = "Central India - Pune" },
  { value = "southindia", label = "South India - Chennai" },
]
prompt = "Azure Region"
required = true
type = "select"

[[elements]]
help = "Name of the Azure Resource Group (will be created if doesn't exist)"
name = "azure_resource_group_name"
nickel_path = ["provider", "azure_resource_group_name"]
prompt = "Resource Group name"
required = true
type = "text"

[[elements]]
default = "Standard_B2s"
help = "Azure VM size (determines CPU, RAM, and pricing)"
name = "azure_vm_size"
nickel_path = ["provider", "azure_vm_size"]
options = [
  { value = "Standard_B1s", label = "Standard_B1s - 1 vCPU, 1 GB RAM (burstable)" },
  { value = "Standard_B1ms", label = "Standard_B1ms - 1 vCPU, 2 GB RAM (burstable)" },
  { value = "Standard_B2s", label = "Standard_B2s - 2 vCPU, 4 GB RAM (burstable)" },
  { value = "Standard_B2ms", label = "Standard_B2ms - 2 vCPU, 8 GB RAM (burstable)" },
  { value = "Standard_B4ms", label = "Standard_B4ms - 4 vCPU, 16 GB RAM (burstable)" },
  { value = "Standard_D2s_v3", label = "Standard_D2s_v3 - 2 vCPU, 8 GB RAM (general purpose)" },
  { value = "Standard_D4s_v3", label = "Standard_D4s_v3 - 4 vCPU, 16 GB RAM (general purpose)" },
  { value = "Standard_D8s_v3", label = "Standard_D8s_v3 - 8 vCPU, 32 GB RAM (general purpose)" },
  { value = "Standard_E2s_v3", label = "Standard_E2s_v3 - 2 vCPU, 16 GB RAM (memory optimized)" },
  { value = "Standard_E4s_v3", label = "Standard_E4s_v3 - 4 vCPU, 32 GB RAM (memory optimized)" },
  { value = "Standard_F2s_v2", label = "Standard_F2s_v2 - 2 vCPU, 4 GB RAM (compute optimized)" },
  { value = "Standard_F4s_v2", label = "Standard_F4s_v2 - 4 vCPU, 8 GB RAM (compute optimized)" },
]
prompt = "Virtual Machine Size"
required = true
type = "select"

[[elements]]
default = "Canonical"
help = "Publisher of the VM image"
name = "azure_image_publisher"
nickel_path = ["provider", "azure_image_publisher"]
options = [
  { value = "Canonical", label = "Canonical (Ubuntu)" },
  { value = "Debian", label = "Debian (Debian Linux)" },
  { value = "RedHat", label = "Red Hat (RHEL)" },
  { value = "OpenLogic", label = "OpenLogic (CentOS)" },
  { value = "AlmaLinux", label = "AlmaLinux Foundation" },
  { value = "MicrosoftWindowsServer", label = "Microsoft (Windows Server)" },
]
prompt = "Image Publisher"
required = true
type = "select"

[[elements]]
default = "0001-com-ubuntu-server-jammy"
help = "Specific offer from the publisher (must match publisher)"
name = "azure_image_offer"
nickel_path = ["provider", "azure_image_offer"]
options = [
  { value = "0001-com-ubuntu-server-jammy", label = "Ubuntu Server 22.04 LTS" },
  { value = "0001-com-ubuntu-server-focal", label = "Ubuntu Server 20.04 LTS" },
  { value = "debian-11", label = "Debian 11" },
  { value = "debian-12", label = "Debian 12" },
  { value = "RHEL", label = "Red Hat Enterprise Linux" },
  { value = "CentOS", label = "CentOS" },
  { value = "almalinux", label = "AlmaLinux" },
]
prompt = "Image Offer"
required = true
type = "select"

[[elements]]
default = "22_04-lts-gen2"
help = "SKU (version) of the image (must match offer)"
name = "azure_image_sku"
nickel_path = ["provider", "azure_image_sku"]
options = [
  { value = "22_04-lts-gen2", label = "Ubuntu 22.04 LTS Gen2" },
  { value = "20_04-lts-gen2", label = "Ubuntu 20.04 LTS Gen2" },
  { value = "11-gen2", label = "Debian 11 Gen2" },
  { value = "12-gen2", label = "Debian 12 Gen2" },
  { value = "9-lvm-gen2", label = "RHEL 9 Gen2" },
  { value = "8-lvm-gen2", label = "RHEL 8 Gen2" },
]
prompt = "Image SKU"
required = true
type = "select"

[[elements]]
default = "30"
help = "Size of the OS disk in GB (minimum 30 GB)"
name = "azure_os_disk_size_gb"
nickel_path = ["provider", "azure_os_disk_size_gb"]
prompt = "OS Disk size (GB)"
required = true
type = "text"

[[elements]]
default = "StandardSSD_LRS"
help = "Type of managed disk for OS volume"
name = "azure_os_disk_type"
nickel_path = ["provider", "azure_os_disk_type"]
options = [
  { value = "Standard_LRS", label = "Standard_LRS - Standard HDD (locally redundant)" },
  { value = "StandardSSD_LRS", label = "StandardSSD_LRS - Standard SSD (locally redundant)" },
  { value = "Premium_LRS", label = "Premium_LRS - Premium SSD (locally redundant)" },
  { value = "UltraSSD_LRS", label = "UltraSSD_LRS - Ultra SSD (highest performance)" },
]
prompt = "OS Disk type"
required = true
type = "select"

[[elements]]
default = "azureuser"
help = "Administrator username for the VM"
name = "azure_admin_username"
nickel_path = ["provider", "azure_admin_username"]
prompt = "Admin username"
required = true
type = "text"

[[elements]]
help = "SSH public key for authentication (e.g., ~/.ssh/id_rsa.pub content)"
name = "azure_ssh_public_key"
nickel_path = ["provider", "azure_ssh_public_key"]
prompt = "SSH public key"
required = true
type = "text"

[[elements]]
default = "10.0.0.0/16"
help = "Address space for the Virtual Network (CIDR notation)"
name = "azure_vnet_address_space"
nickel_path = ["provider", "azure_vnet_address_space"]
prompt = "Virtual Network address space"
required = true
type = "text"

[[elements]]
default = "10.0.1.0/24"
help = "Address prefix for the subnet (CIDR notation)"
name = "azure_subnet_address_prefix"
nickel_path = ["provider", "azure_subnet_address_prefix"]
prompt = "Subnet address prefix"
required = true
type = "text"

[[elements]]
default = true
help = "Assign a public IP to the VM for external access"
name = "azure_enable_public_ip"
nickel_path = ["provider", "azure_enable_public_ip"]
prompt = "Assign public IP address?"
type = "confirm"

[[elements]]
default = false
help = "Enable SR-IOV for better network performance (requires compatible VM size)"
name = "azure_enable_accelerated_networking"
nickel_path = ["provider", "azure_enable_accelerated_networking"]
prompt = "Enable accelerated networking?"
type = "confirm"

[[elements]]
default = true
help = "Enable boot diagnostics for troubleshooting"
name = "azure_enable_boot_diagnostics"
nickel_path = ["provider", "azure_enable_boot_diagnostics"]
prompt = "Enable boot diagnostics?"
type = "confirm"
