|
| 1 | +variable "resource_group_name" { |
| 2 | + default = "" |
| 3 | + description = "Azure VMSS resource group name" |
| 4 | + type = string |
| 5 | +} |
| 6 | + |
| 7 | +variable "vmss_name" { |
| 8 | + default = "" |
| 9 | + description = "Azure VMSS name" |
| 10 | + type = string |
| 11 | +} |
| 12 | + |
| 13 | +variable "location" { |
| 14 | + default = "" |
| 15 | + description = "Azure location" |
| 16 | + type = string |
| 17 | +} |
| 18 | + |
| 19 | +variable "sku_size" { |
| 20 | + default = "" |
| 21 | + description = "Azure VMSS sku" |
| 22 | + type = string |
| 23 | +} |
| 24 | + |
| 25 | +variable "default_instance_count" { |
| 26 | + default = 0 |
| 27 | + description = "Default instance count for the VMSS" |
| 28 | + type = number |
| 29 | +} |
| 30 | + |
| 31 | +variable "admin_username" { |
| 32 | + default = "admin_user" |
| 33 | + description = "VMSS default user name" |
| 34 | + type = string |
| 35 | +} |
| 36 | + |
| 37 | + |
| 38 | +variable "subnet_name" { |
| 39 | + default = "" |
| 40 | + description = "Azure subnet name to create vmss" |
| 41 | + type = string |
| 42 | +} |
| 43 | + |
| 44 | +variable "vnet_name" { |
| 45 | + default = "" |
| 46 | + description = "Azure Vnet Name" |
| 47 | + type = string |
| 48 | +} |
| 49 | + |
| 50 | +variable "vnet_resource_group" { |
| 51 | + default = "" |
| 52 | + description = "Azure Vnet resource group" |
| 53 | + type = string |
| 54 | +} |
| 55 | + |
| 56 | + |
| 57 | +variable "os_disk_storage_account_type" { |
| 58 | + default = "Standard_LRS" |
| 59 | + description = "OS disk storage account type" |
| 60 | + type = string |
| 61 | + validation { |
| 62 | + condition = contains(["Standard_LRS", "StandardSSD_LRS", "StandardSSD_ZRS", "Premium_LRS", "Premium_ZRS"], var.os_disk_storage_account_type) |
| 63 | + error_message = "OS disk storage account type must be one among Standard_LRS,StandardSSD_LRS,StandardSSD_ZRS,Premium_LRS,Premium_ZRS." |
| 64 | + } |
| 65 | +} |
| 66 | + |
| 67 | +variable "os_disk_size" { |
| 68 | + default = 30 |
| 69 | + description = "OS disk size in GB" |
| 70 | + type = number |
| 71 | +} |
| 72 | + |
| 73 | + |
| 74 | +variable "additional_data_disks" { |
| 75 | + description = "Adding additional disks capacity to add each instance in GB" |
| 76 | + type = list(number) |
| 77 | + default = [] |
| 78 | +} |
| 79 | + |
| 80 | +variable "additional_data_disks_storage_account_type" { |
| 81 | + description = "The Type of Storage Account which should back this Data Disk. Possible values include Standard_LRS, StandardSSD_LRS, Premium_LRS and UltraSSD_LRS." |
| 82 | + default = "Standard_LRS" |
| 83 | + type = string |
| 84 | + validation { |
| 85 | + condition = contains(["Standard_LRS", "StandardSSD_LRS", "StandardSSD_ZRS", "Premium_LRS", "Premium_ZRS"], var.additional_data_disks_storage_account_type) |
| 86 | + error_message = "Data disk storage account type must be one among Standard_LRS,StandardSSD_LRS,StandardSSD_ZRS,Premium_LRS,Premium_ZRS." |
| 87 | + } |
| 88 | +} |
| 89 | + |
| 90 | +variable "application_name" { |
| 91 | + default = "" |
| 92 | + description = "Azure application name tag" |
| 93 | + type = string |
| 94 | +} |
| 95 | + |
| 96 | +variable "environment" { |
| 97 | + default = "" |
| 98 | + description = "Environment tag value in Azure" |
| 99 | + type = string |
| 100 | + validation { |
| 101 | + condition = contains(["DEV", "QA", "UAT", "PROD"], var.environment) |
| 102 | + error_message = "Environment value should be one among DEV or QA or UAT or PROD." |
| 103 | + } |
| 104 | +} |
| 105 | + |
| 106 | +variable "priority" { |
| 107 | + default = "" |
| 108 | + description = "Type of vmss instances Spot or regular" |
| 109 | + type = string |
| 110 | + validation { |
| 111 | + condition = contains(["Spot", "Regular"], var.priority) |
| 112 | + error_message = "Priority Should be either Regular or Spot." |
| 113 | + } |
| 114 | +} |
| 115 | + |
| 116 | +variable "eviction_policy" { |
| 117 | + default = "Delete" |
| 118 | + description = "Azure Spot VM eviction policy Delete or Deallocate" |
| 119 | + type = string |
| 120 | +} |
| 121 | + |
| 122 | +variable "load_balancer_sku" { |
| 123 | + default = "Basic" |
| 124 | + description = "Azure Loadbalancer Skus" |
| 125 | + type = string |
| 126 | + validation { |
| 127 | + condition = contains(["Basic", "Standard", "Gateway"], var.load_balancer_sku) |
| 128 | + error_message = "Load balancer SKU must be one among Basic , Standard or Gateway type." |
| 129 | + } |
| 130 | +} |
| 131 | + |
| 132 | +variable "frontend_port" { |
| 133 | + default = 80 |
| 134 | + type = number |
| 135 | + description = "Port on which queries for status of application" |
| 136 | +} |
| 137 | + |
| 138 | +variable "backend_port" { |
| 139 | + default = 80 |
| 140 | + type = number |
| 141 | + description = "Port on which traffic is passed on to application backends" |
| 142 | +} |
| 143 | +variable "request_path" { |
| 144 | + default = "/" |
| 145 | + type = string |
| 146 | + description = "Health check path" |
| 147 | +} |
| 148 | + |
| 149 | +variable "protocol" { |
| 150 | + default = "Http" |
| 151 | + description = "Protocol for Load balancing" |
| 152 | + type = string |
| 153 | + validation { |
| 154 | + condition = contains(["Http", "Https", "Tcp"], var.protocol) |
| 155 | + error_message = "Protocol value should be one among Http, Https or Tcp." |
| 156 | + } |
| 157 | +} |
| 158 | + |
0 commit comments