|
| 1 | +################################################################################################################# |
| 2 | +# REQUIRED VARIABLES |
| 3 | +################################################################################################################# |
| 4 | + |
| 5 | +variable "resource_group_name" { |
| 6 | + type = string |
| 7 | + description = "The name of the Azure resource group in which resources will be deployed." |
| 8 | +} |
| 9 | + |
| 10 | +variable "resource_group_location" { |
| 11 | + type = string |
| 12 | + description = "The Azure region where the resource group will be created." |
| 13 | +} |
| 14 | + |
| 15 | +variable "subnet_id" { |
| 16 | + type = string |
| 17 | + description = "The ID of the subnet where the virtual machine will be deployed." |
| 18 | +} |
| 19 | + |
| 20 | +variable "network_interface_name" { |
| 21 | + type = string |
| 22 | + description = "The name of the network interface to associate with the virtual machine." |
| 23 | +} |
| 24 | + |
| 25 | +variable "ip_configuration_name" { |
| 26 | + type = string |
| 27 | + description = "The name of the IP configuration for the network interface." |
| 28 | +} |
| 29 | + |
| 30 | +variable "vm_name" { |
| 31 | + type = string |
| 32 | + description = "The name of the virtual machine instance." |
| 33 | +} |
| 34 | + |
| 35 | +variable "storage_os_disk_name" { |
| 36 | + type = string |
| 37 | + description = "The name assigned to the OS disk." |
| 38 | +} |
| 39 | + |
| 40 | +variable "os_profile_computer_name" { |
| 41 | + type = string |
| 42 | + description = "The hostname of the virtual machine." |
| 43 | +} |
| 44 | + |
| 45 | +variable "os_profile_admin_username" { |
| 46 | + type = string |
| 47 | + description = "The administrator username for the virtual machine." |
| 48 | +} |
| 49 | + |
| 50 | +variable "os_profile_admin_password" { |
| 51 | + type = string |
| 52 | + description = "The administrator password for the virtual machine. Use environment variables or a secret manager instead." |
| 53 | +} |
| 54 | + |
| 55 | +variable "network_security_group_id" { |
| 56 | + type = string |
| 57 | + description = "ID of network security group" |
| 58 | +} |
| 59 | + |
| 60 | +################################################################################################################# |
| 61 | +# OPTIONAL VARIABLES (WITH DEFAULT VALUES) |
| 62 | +################################################################################################################# |
| 63 | + |
| 64 | +variable "vm_size" { |
| 65 | + type = string |
| 66 | + description = "Specifies the size of the virtual machine." |
| 67 | + default = "Standard_B4ms" |
| 68 | +} |
| 69 | + |
| 70 | +variable "storage_os_disk_caching" { |
| 71 | + type = string |
| 72 | + description = "Defines the caching policy for the OS disk (e.g., ReadOnly, ReadWrite)." |
| 73 | + default = "ReadWrite" |
| 74 | +} |
| 75 | + |
| 76 | +variable "storage_os_disk_create_option" { |
| 77 | + type = string |
| 78 | + description = "Determines how the OS disk should be created (e.g., FromImage, Attach, Empty)." |
| 79 | + default = "FromImage" |
| 80 | +} |
| 81 | + |
| 82 | +variable "storage_os_disk_managed_disk_type" { |
| 83 | + type = string |
| 84 | + description = "Defines the type of managed disk for the OS disk (e.g., Premium_LRS, Standard_LRS)." |
| 85 | + default = "Premium_LRS" |
| 86 | +} |
| 87 | + |
| 88 | +variable "custom_image_sku" { |
| 89 | + type = string |
| 90 | + description = "The custom image SKU (name)." |
| 91 | +} |
| 92 | + |
| 93 | +variable "custom_image_resource_group_name" { |
| 94 | + type = string |
| 95 | + description = "The custom image resource group." |
| 96 | +} |
0 commit comments