@@ -48,27 +48,27 @@ variable "tags" {
4848 default = {}
4949}
5050
51+ variable "subnet_id" {
52+ type = string
53+ description = " The ID of the Subnet where this Network Interface should be located in."
54+ }
55+
56+ variable "public_ip_enabled" {
57+ type = bool
58+ description = " Boolean flag to enable Public Ip address creation and assignment to Virtual Machine"
59+ default = true
60+ }
61+
5162variable "public_ip_allocation_method" {
5263 type = string
5364 description = " Defines the allocation method for this IP address. Possible values are Static or Dynamic"
5465 default = " Dynamic"
5566}
5667
57- variable "subnet_id " {
68+ variable "network_interface_private_ip_address_allocation " {
5869 type = string
59- description = " The ID of the Subnet where this Network Interface should be located in."
60- }
61-
62- variable "network_interface" {
63- type = object ({
64- private_ip_address_allocation = string
65- public_ip_enabled = bool
66- })
67- description = " Objects to configure network interface"
68- default = {
69- private_ip_address_allocation = " Dynamic"
70- public_ip_enabled = true
71- }
70+ description = " The allocation method used for the Private IP Address."
71+ default = " Dynamic"
7272}
7373
7474variable "vm_size" {
@@ -99,40 +99,30 @@ variable "admin_ssh_key" {
9999
100100variable "os_disk" {
101101 type = object ({
102- caching = string
103- storage_account_type = string
102+ caching = optional ( string , " ReadWrite " )
103+ storage_account_type = optional ( string , " Standard_LRS " )
104104 })
105105 description = " Objects to configure os disk reference for virtual machine"
106- default = {
107- caching = " ReadWrite"
108- storage_account_type = " Standard_LRS"
109- }
110106}
111107
112108variable "source_image_reference" {
113109 type = object ({
114- publisher = string
115- offer = string
116- sku = string
117- version = string
110+ publisher = optional ( string , " Canonical " )
111+ offer = optional ( string , " 0001-com-ubuntu-server-focal " )
112+ sku = optional ( string , " 20_04-lts " )
113+ version = optional ( string , " latest " )
118114 })
119115 description = " Objects to configure source image reference for virtual machine"
120- default = {
121- publisher = " Canonical"
122- offer = " 0001-com-ubuntu-server-focal"
123- sku = " 20_04-lts"
124- version = " latest"
125- }
126116}
127117
128118variable "identity_enabled" {
129119 type = bool
130- description = " identity enabled "
120+ description = " Boolean flag than enables creation of System Assigned identity to VM "
131121 default = false
132122}
133123
134124variable "password_access_enabled" {
135125 type = bool
136- description = " Vm password access enabled "
126+ description = " Boolean flag that enables access using password "
137127 default = false
138128}
0 commit comments